Count files recursively in a directory
Using Linux, to get the number of files in the current directory, use:
ls -1 | wc -l
To count the number of files recursively in the current and all directories below it, use:
find . -type f | wc -l