return the number of words contained within a string