count_words function

Count the frequency of words in a string of text x.