You can do it with sed and awk:
$ sed 's/[^"]//g' dat | awk '{ print length }'
2
0
Where dat is your example text, sed deletes (for each line) all non-" characters and awk prints for each line its size (i.e. length is equivalent to length($0), where $0 denotes the current line).
For another character you just have to change the sed expression. For example for ( to:
's/[^(]//g'
Update: sed is kind of overkill for the task - tr is sufficient. An equivalent solution with tr is:
$ tr -d -c '"\n' < dat | awk '{ print length; }'
Meaning that tr deletes all characters which are not (-c means complement) in the character set "\n.