Count words in given string