For PHP 4>
int substr_count(string haystack, string needle)
Ex.
print substr_count("This is a test", "is"); // prints out 2
And I might recommend the chm file for the PHP manual, it is much easier to use(search) than any book. The help chm also had a function for PHP3, let me know if you need it.
H