The four lengths answer four different questions
What a person usually perceives as one visible character. TXT Metrics uses this for the main character count.
The Unicode values that compose text, written like U+1F44D.
The units reported by JavaScript string length. Many emoji use more than one.
The encoded storage or transfer size in UTF-8.
Examples that expose the difference
| Text | Graphemes | Code points | UTF-16 | UTF-8 |
|---|---|---|---|---|
| A | 1 | 1 | 1 | 1 |
| eฬ | 1 | 2 | 2 | 3 |
| ๐๐ฝ | 1 | 2 | 4 | 8 |
| ๐จโ๐ฉโ๐งโ๐ฆ | 1 | 7 | 11 | 25 |
The combining-accent example contains two code points but renders as one grapheme. The family emoji uses four emoji plus three zero-width joiners and still appears as one grapheme.
Words depend on language and segmentation rules
Splitting only on spaces fails for Japanese, Chinese, Thai, and other writing systems. The counter uses Intl.Segmenter with the page locale and counts segments marked as word-like. This is more appropriate than a whitespace-only rule, but no automatic word boundary algorithm represents every editorial convention.
Sentence counts, reading time, and speaking time are also estimates. They are presented as supporting metrics rather than universal linguistic facts.
Reproduce the edge cases
The public corpus records inputs and expected grapheme, code point, UTF-16, and UTF-8 totals used by the project. It contains no user text and can be downloaded for testing another counter.