Count the number of words in a String.
Syntax
Parameters
subject - The String to count the words of.format - The format to return results in.0 (default) - The number of words found will be returned as an integer Number.1 - An Array will be returned, containing all the words found inside subject.2 - An Array will be returned just like if the value is 1, but each Array key will be the numeric position inside subject that the word is found at.charlist - A list of additional characters to be considered as "word".
Result
Returns information about the words used in subject. A "word" is a locale-dependant string containing alphabetic characters, which may contain, but not start with, single-quote (') and hyphen (-) characters.