created a program to count words