short program to print word count of chunk of text