linux get file count in directory code example
Example 1: count files recursively linux
find DIR_NAME -type f | wc -l
Example 2: how to check how many files are in a folder linux
$ ls | wc -l
find DIR_NAME -type f | wc -l
$ ls | wc -l