find DIR_NAME -type f | wc -l
find : find is a command for recursively filtering objects in the file system.
DIR_NAME : Directory name in which you have to calculate files.
* Replace DIR_NAME with . (dot) to find in the current directory.
-type f : Only find the files.
| : Piping the output of find command to the input of
wc : Command to count word.
-l : To count total number of lines.