Count the number of words in a file