Count the number of words.