c++ program that counts words in a text file