This counts all of the files in the current directory and all children directories:

find . -type f | wc -l