Splitting the words in a string and return the desired number of words