Try this. It assumes you've already extracted the sentence into the field "sentence".
... | eval count=mvcount(split(sentence," ")) | ...