add the word count function