Why Word Counts for Multilingual Text Can't Be Replaced by Byte Counts
Treating byte counts as word counts is one of the most common shortcuts in multilingual text processing. It looks like it's only one function call away, but …

Treating byte counts as word counts is one of the most common shortcuts in multilingual text processing. It looks like it's only one function call away, but in practice it causes length limits, billing, typesetting, and search to all go wrong at the same time. The reason is simple: word count is a linguistic unit, byte count is an encoding unit, and there is no fixed exchange rate between the two.
Start with encoding. UTF-8 is a variable-length encoding: ASCII letters take 1 byte, accented Latin letters usually take 2 bytes, Chinese characters usually take 3 bytes, and emoji usually take 4 bytes. So "你好" is 2 characters and 6 bytes, "hello" is 5 characters and 5 bytes, and "café" is 4 characters and 5 bytes. The same stretch of Chinese text might be 2 bytes per character if stored in GBK, and a different set of numbers again in UTF-16. The character sequence hasn't changed, but the byte count changes with the encoding, so byte counts cannot define character counts in reverse.
The second layer of trouble is inside Unicode itself. A single character as seen by the eye may consist of multiple code points. é can be one precomposed code point, or it can be two code points: e plus a combining acute accent; a family emoji is assembled from several emoji plus zero-width joiners, displayed as one graphic, yet its code point count is far more than one; a flag emoji consists of two regional indicator symbols. Counting by code point overcounts all of these; counting by bytes is even further off.
So "word count" has at least four possible definitions: byte count, Unicode code point count, grapheme cluster count, and word count. They serve different purposes. Database field lengths and form validation should usually use characters or grapheme clusters; storage capacity and transmission limits should use bytes; translation quotes often use word counts or source character counts; typesetting needs display width, because Chinese characters are full-width and Latin letters are half-width, so the same number of characters occupies different column widths.
The real-world pitfalls are very concrete. A form says "maximum 20 characters"; if the backend validates by UTF-8 bytes, Chinese users can only enter 6 Chinese characters while English users can enter 20 letters — the same rule is not equivalent across languages. SMS is segmented by encoding; plain text and text containing Chinese use different encodings and therefore hold different numbers of characters, so estimating by bytes will get the message count wrong. If a database uses a binary column and truncates by bytes, Chinese text gets cut in the middle of a character and produces garbled output.
There is another layer: word count itself has no single answer. Chinese counts by character, English by word, Thai and Japanese have no space-based word segmentation, and Arabic has cursive shaping; the same passage of text will yield different numbers in different tools. Grapheme cluster segmentation rules also change with Unicode versions, so emoji sequence counts may shift. Chasing an "absolutely correct word count" is therefore meaningless; what is meaningful is to state the purpose of the statistic first, then choose a definition.
The actionable approach is: first ask what the number will be used for; if you need the number of characters a human would see, use a grapheme cluster library; if you need a storage ceiling, use bytes and specify the encoding explicitly; make the frontend, backend, and database agree on one definition; and prepare one sample each in Chinese, Arabic, emoji, and combining accents for regression testing. Don't use approximations like "divide the byte count by 3" — it barely works for pure Chinese, and it loses accuracy as soon as emoji, accented letters, and mixed scripts appear.