User:Muchos/Snippets/Wordcounter

Approximating word count in a string by counting spaces (by User:HumansCanWinElves, 2023-08-25).

Basic form
Result:

Advanced method
(Ignores multiple spaces, takes linebreaks in account.)

Result:

Using #dplreplace
Result: