What is the most efficient way to count all the occurrences of a specific character in a PHP string?
Can you not feed the character to preg_match_all?