perldoc -q count [download]
And amazingly, it will answer your question. See also: perlfaq4.
In reply to Re: count special character by moritz in thread count special character by bharatbsharma