Find the number of words and characters in a string