To count the number of files in a folder (including its subfolders, pipe the output of a find command to the wc (word count) command.
# From base folder
find . -type f | wc -l
The -type f switch on find tells it to only find files. The output of this is one file per line.
The -l switch on wc tells it to count lines instead of words