Saswati. I'll just deal with a grammatical error in your question first: "box" is countable, so "how many" needs a plural noun phrase: "How many match boxes".
Now, to get on to your question about tenses. The use of the perfect in English is difficult for learners, there is no doubt.
In most cases, both forms (present perfect, and simple past) are possible: the difference usually lies not in the circumstances being described, but just in how the speaker is choosing to relate to them.
If you say
How many matchboxes did you use?
you are regarding the event of using the matchboxes as complete and finished. If you say
How many matchboxes have you used?
you are regarding it as having some present relevance.
What makes it difficult, is that the precise nature of this present relevance is not expressed, and it could be different things. It could be that you are still doing things with matchboxes, and might use some more after this. It could be that you have only just finished using the matchboxes, and the speaker is regarding the use as continuing to the present. It could be that you are looking at the construction made out of matchboxes, and so the "present relevance" is that the result of the using is here before you.
But in all those circumstances, except perhaps the first, you could equally choose to ask "How many matchboxes did you use?", presenting the activity as complete for the purposes of the question.