Get the number of files in the given directory