counts # of times word has been used in string