counts words in a txt file