The simplest way to count number of files & subdirectories in a parent directory using a “tree” command.
$ tree -iLf 1
$ tree -iLf 1 /var/log
You can use the tree man page for more useful options, configuration files and environment variables to use.
At Velan, our server support engineers can help you with install Linux OS and help to identify the files & folder counts on your server. If you are interested in our service, please fill the Quick connect form to get in touch with us.