WLJS LogoWLJS Notebook

WordCount

WordCount["string"] gives the total number of words in string.

Examples

Count words in a string:

WordCount["The quick brown fox jumps over the lazy dog"]

Count words in longer text:

WordCount["Hello world. This is a test sentence."]

Please visit the official Wolfram Language Reference for more details.

On this page