Find

Count number of directories in current directory

find . -maxdepth 1 -type d | wc -l

Details at https://stackoverflow.com/a/17648137