Add program to count words in a string.