Script that counts the files in a directory