check for the number of files