TextEdit Word and Character Counts?

I'm new to the Mac platform, learning the applications on my new MacBook Air. Please tell me there is a way to get word and character counts in TextEdit (either for the entire document or just highlighted text). All of the articles I have found online say no, but they are also older articles. If that is still the case, come on Apple, it's 2021 and this is pretty rudimentary functionality.

MacBook Air

Posted on Mar 6, 2021 6:29 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 7, 2021 12:35 PM

Grab the free WordService package from the Mac App Store. As part of the download, it will install several Services that are not automatically active. One of these is WordService:Statistics which gives you what you want for any selected text in any application.


Here is the output from the preceding paragraph:



You can enable the WordService services via the System Preferences > Keyboard panel > Shortcuts > Services list. Some other useful services are selecting a text list of words and sorting it ascending or descending. In the above paragraph example, I selected the paragraph, then right-clicked on that selection to get the Services menu item on the contextual menu, then located WordService:Statistics…

Similar questions

6 replies
Question marked as Top-ranking reply

Mar 7, 2021 12:35 PM in response to DiscoDave2000

Grab the free WordService package from the Mac App Store. As part of the download, it will install several Services that are not automatically active. One of these is WordService:Statistics which gives you what you want for any selected text in any application.


Here is the output from the preceding paragraph:



You can enable the WordService services via the System Preferences > Keyboard panel > Shortcuts > Services list. Some other useful services are selecting a text list of words and sorting it ascending or descending. In the above paragraph example, I selected the paragraph, then right-clicked on that selection to get the Services menu item on the contextual menu, then located WordService:Statistics…

Mar 6, 2021 6:46 PM in response to DiscoDave2000

No Apple here.


It's a basic text editor that can do rich text. That's about the limit of its capability.

There are four or so free (or nearly free) text editors that might have that feature. BBedit (does have it), Sublime Text, SubEthaEdit, Brackets (more geared toward web programming).

Not sure why anyone would need that feature. I've never needed it in over 30 years.



TextEdit is scriptable, so it would likely be simple to create a script to display those counts.

Mar 6, 2021 7:02 PM in response to Barney-15E

It was easy.

tell application "TextEdit"
	set docName to name of document 0
	set wordCount to count of words of text of document 0
	set paraCount to count of paragraphs of text of document 0
	set charCount to count of characters of text of document 0
	set DocumentStatistics to docName & " Statistics" & return & return & wordCount & " words" & return & paraCount & " paragraphs" & return & charCount & " characters" as text
	display dialog DocumentStatistics
	
end tell


Wrap it all in an Automator Quick Action and you can set a keyboard shortcut for it.


Pages is a much better document editor, and it has document statistics.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

TextEdit Word and Character Counts?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.