Counts number of occurences of words in a sentence