bash: calculate number of the directories

As a part of my bash routine, I am trying to locate number of subdirectories located in the directory $storage and assosiate it to some variable, which will be used in the same script

number_dirs=$(ls -ld "${storage}"/* | wc -l)
  printf >&2 '%s is the number of the directories... ' "${number_dirs}" ;sleep 0.2
  printf >&2 "Keep calm!n"

this works fine with the number of dirs around 2-4K but does not work with the huge number. How I could use find command in the same way instead?