// Usefulness of the two functions
<?php
$string="aaabbc";
// You just want to count the letter a
$acount=substr_count($string,"a");
// You want to count both letter a and letter b
$counts=count_chars($string,0);
$acount=$counts[ord("a")];
$bcount=$counts[ord("b")];
?>