You can do it using a closure (works just with PHP 5.3):
$comment = 'billie jean is not my lover she is just a girl';
$words = array('jean','lover','jean');
$lin = count(array_filter($words,function($word) use ($comment) {return strpos($comment,$word) !== false;}));
Or in a simpler way:
$comment = 'billie jean is not my lover she is just a girl';
$words = array('jean','lover','jean');
$lin = count(array_intersect($words,explode(" ",$comment)));
In the second way it will just return if there's a perfect match between the words, substrings won't be considered.