How to count the number of words in your documents