Listing files in a given directory with given extention

for some reason my code does not give the right number of files. can omeone help me please?

Where's your code ?

Can you post your code?