<?php

$stopwords = array('потому что',' Я','ты','люб');
$text = "потому что Любимый мой! бы то ни было Я Я Я хочу сказать тебе, что ты у меня самый любимый!";

$summ=0;

foreach ($stopwords as $slovo)
{
 if(preg_match_all ('/\b'.preg_replace('/\s+/','\s+',preg_quote(trim($slovo))).'\b/us', $text, $matches)){
 	printf ("word `%s` occurs %d times\n",$slovo,count($matches[0]));
 	$summ+=count($matches[0]);
 } else {
 	printf ("no word `%s` found\n",$slovo);
 }
}
printf ("totally found `%s` stopwords\n",$summ);