How to count number of folders in folder|directory in Linux?
To count number of folders/directories/files in folder/directory is possible using wc command with a parameter -l. But we have to be sure, that we are counting only folders, so let's filter only folder using ls command, and then count then.
My example:
$ pwd
/home/dima/
Then let's take a look, which files and folders we have: