Php nin bunun için bir fonksiyonu var zaten,substr_count()
 <?php
echo substr_count('burada-kaç-tane-tire-var','-');
?>