ed eccomi anche iooooooooooooo 
leggendo la documentazione ho visto un parametro che sinceramente ho sempre snobbato:
preg_replace (udite udite) restituisce anche il numero di rimpiazzi effettuati!!!
oh my god!
se ho capito bene l'italianesco del post (lo ammetto.. non l'ho letto tutto...)
fare i così...
Codice PHP:
$testo = $post->post_content;
$total=0;
$stringa = array('social network', 'marines', 'divieto per i marines', 'motivazione', 'attacchi');
foreach($stringa as $category){
//$perCat rappresenta il numero di rimpiazzi effettuati
$testo = preg_replace("/($category)/i", '[b]<span style="background-color: #CCFF99">$1</span>[/b]', $testo,-1,$perCat);
echo "nel testo sono stati effettuati $perCat rimpiazzi per la parola `$category`
";
$total+=$perCat;
}
echo $testo;
echo "
Ho effettuato in totale $total sostituzioni.
";