Count the frequency of a word in the corpus