finish count-words-in-string