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


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

- Character sequences in "string" that are not identified as being part of words are excluded from WordCount.
Examples
open all close allRelated Guides
History
Text
Wolfram Research (2015), WordCount, Wolfram Language function, https://reference.wolfram.com/language/ref/WordCount.html.
CMS
Wolfram Language. 2015. "WordCount." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WordCount.html.
APA
Wolfram Language. (2015). WordCount. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WordCount.html
BibTeX
@misc{reference.wolfram_2025_wordcount, author="Wolfram Research", title="{WordCount}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/WordCount.html}", note=[Accessed: 14-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_wordcount, organization={Wolfram Research}, title={WordCount}, year={2015}, url={https://reference.wolfram.com/language/ref/WordCount.html}, note=[Accessed: 14-August-2025]}