We can use grep with regex to make it more simple and powerful.
To count specific character.
$ grep -o '"' file.txt|wc -l
To count special characters including whitespace characters.
$ grep -Po '[\S\s]''[\W_]' file.txt|wc -l
$ echo 'abcde'|grep -Po '[\S\s]' |wc -l
HereHere we are selecting any character with '[\S\s]'[\S\s] and with -o option we make grep to print each match (which is, each character) in separate line. And then use wc -l to count each line.