character match and count

Use and complete the template provided. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:

How can I count number of occurance of a single character in a file..
eg. How many '$' characters are there in account file..!
2. Relevant commands, code, scripts, algorithms:
may be uniq,wc,cmp and using pipes

  1. The attempts at a solution (include all code and scripts):
    tried with uniq..but it shows number of lines repeated,not single character

  2. School (University) and Course Number:
    UB..CS390

grep -o '\$' file-name | wc -l

Match using grep, and count using wc.