For counting words in a paragraph, it may be easier to count the spaces between words, and add one. [man]preg_match_all/man will tell you how many times its pattern matches in the string, and with the PREG_OFFSET_CAPTURE flag set, tell you where those matches were (so that you know where to cut).
Well, maybe not that much easier. To find all the sequences of consecutive whitespace (between words)the pattern is
/\s+/
while to match the words (including punctuation, btw) themselves it's
/\S+/
Swings and roundabouts, I suppose.