codice:
<?
$stringa="ciao 
ciao

ciao
";

$totale_a_capo=substr_count($stringa,"\n");

echo $totale_a_capo;
?>