this is one:
ls -l . | egrep -c '^-'
Note:
ls -1 | wc -l
Which means: ls: list the files in dir
-1: (that's a ONE) only each entry per line. Change it to -1a if you want to hide the files too
|: pipe output onto.
WC: wordcount
-l: the count lines.
Come and join Linux training to gain great knowledge.
Do check out the video below