Appearance
Counts the number of words in a string.
str
string
number
countWords('Hello world'); // 2 countWords(' This is a test. '); // 4 countWords(''); // 0