I don't see anything wrong with what you've done - however it could be simpler. In particular, you don't need the [[ "$folder" == *c* ]] test if you use a glob pattern that only matches names containing c from the get-go:
count=0
shopt -s nullglob
for folder in c/; do
((count++))
done
Note that if you go that route you need to set the nullglob option, otherwise you will get an apparent count of 1 when there are no matches (because the unexpanded pattern *c*/ gets passed to the loop).
But there are ways that don't require the explicit shell loop at all. If you want to count only non-hidden directories at the top-level of the current directory, then in bash you could place the matching directories in an array, then print the number of elements:
shopt -s nullglob
dirs=( *c*/ )
printf "Number of subfolders containing the letter 'c': %c\n" "${#dirs[@]}"
If you want to include hidden (dot) directories, set the dotglob shell option as well, i.e. shopt -s nullglob dotglob.
To count recursively, I'd suggest using the find command, e.g.
count=$(find . -type d -name '*c*' -printf x | wc -c)
where x is an arbitrary single byte character. You could use -printf '\n' with wc -l if you prefer. Note that this includes hidden directories by default so you would need to exclude them explicitly, e.g. -name '*c*' ! -name '.*'.1
With zsh you could use an anonymous shell function to count glob matches directly, e.g.
# non-recursive, exclude hidden dirs
() { printf "Number of subfolders containing the letter 'c': %d\n" $# } *c*(/N)
non-recursive, include hidden dirs
() { printf "Number of subfolders containing the letter 'c': %d\n" $# } c(/ND)
recursive, include hidden dirs
() { printf "Number of subfolders containing the letter 'c': %d\n" $# } */c*(/ND)
where the glob qualifiers /ND select directories only, and apply the nullglob and dotglob flags.
See also Count total number of files in particular directory with specific extension.
1. You could of course use find non-recursively as well, by adding -maxdepth 1