count number of words from string

Count number of words in given string