I have a string that contains text. How do I count the number of occurances of one string in the other.

e.g. How do I count how many times "word" is in "These are my word examples. My word on it."