Solved word count problem