Count number of files in a directory using Linux cli

ls -l . | egrep -c '^-'