how to count number of files