Does anybody know how to count the words in a <Textarea> posted to a php script?

basically each word is separated by a space " " so i think using the explode() function to get an array of the words, but i'm not sure how to approach this. Can somebody help?

Sang N.