how can i get the output of number of words in a text in c++ language