Finding number of words in strings