We can also count the number of words in a string with a built-in function.

There! The str_word_count() function does the trick.

Might it be that count() only works with arrays?