FWIW, a recent solution that does not use the clipboard is a shortcut. A few comments:
- The shortcut has to be run by way of the Services menu or a keyboard shortcut.
- The shortcut worked with most but not every app (Preview was a notable failure).
- The shortcut did not reliably return selected text in Google Chrome in every instance, so I’ve included the selected text in the dialog.
- Characters that are made up of multiple Unicode code points (e.g. letters with diacritics and emojis) appear to be counted as one character.
- A regex can be added to the shortcut to normalize whitespace.
An example with Google Chrome:
The shortcut:
Character Count.shortcut (22.0 KB)