CountWords()

Example 1:

For an object (or variable) named myText, use the following syntax:

var numOfWords = CountWords(myText)

Example 2:

var numOfWords = CountWords("Test string – could also be a variable")