John has a collection of coins consisting of nickels, dimes, and quarters. He has twice as many dimes as nickels and three more quarters than dimes. If the total value of his coins is less than $10, what is the maximum number of nickels he could have? Let's think step by step and output the final answer within \boxed{}.
user