takes a string and returns the number of words by type