$str = "///Hello World!///";
print_r(count_chars($str,1));
Array
(
    [32] => 1
    [33] => 1
    [47] => 6
    [72] => 1
    [87] => 1
    [100] => 1
    [101] => 1
    [108] => 3
    [111] => 2
    [114] => 1
)
$str = $_SERVER['PHP_SELF'] ;
echo $str;
$karakter = count_chars($str,1);
echo "antal: ".$karakter['47'];
/test/diverse/antal_af_karakter.php
antal: 3