Here are several ways to count the number of files in a directory in Linux command line.
Complete Story