What "café 👍" is made of: characters, code points, units and bytes
Ask how long "café 👍" is and you can get four different answers, all correct. A reader counts 6 characters. Unicode counts 6 code points. JavaScript's .length says 7. A UTF-8 file or database column stores 10 bytes. Each answer measures a different layer, and bugs happen when code mixes them up: a limit checked in one unit and enforced in another, or a string cut in the middle of a character.
Start with the code points. c, a and f are U+0063, U+0061 and U+0066, the same numbers they had in ASCII. é is U+00E9, the space is U+0020, and the thumbs up is U+1F44D. That is 6. In UTF-8, the encoding used by almost every web page and file today, code points below 128 take one byte each, so c, a, f and the space take 4. é takes two bytes, C3 A9, and the emoji takes four, F0 9F 91 8D. That makes 10 bytes. UTF-16, the form JavaScript and Java use inside, stores most characters in one 16-bit unit, but code points above U+FFFF need two, a surrogate pair. The emoji becomes D83D DC4D, so .length counts 7. Paste the text into the box above and the four counts and the table show exactly these numbers.
The count of characters you see is the subtle one. Unicode calls them grapheme clusters, and one can be made of many code points. A family emoji is a man, a woman and a girl joined by two zero-width joiners: 5 code points, 8 UTF-16 units and 18 bytes, but one picture. An é can also be written as a plain e followed by U+0301, the combining acute accent, which looks identical to U+00E9 but is two code points. The table shows both forms plainly, which is often how a failed search or a failed comparison gets explained.
The codes mode runs the other way, and accepts the forms code is usually written in. U+00E9, 0xE9, \u00e9 and é all give é, and plain decimal codes such as 72 105 give Hi, which is the "ASCII to text" job. A surrogate pair written as two escapes, such as \uD83D\uDC4D, is joined back into the one emoji it stands for, and half a pair on its own is reported as an error instead of producing a broken character.
Two limits are honest to state. Names come from a short list built into the page, not from the full Unicode database, so the table names ASCII, accented Latin letters and the characters that most often cause trouble, and leaves the rest unnamed rather than guessing. And the count of characters you see depends on the browser's own segmenter. It follows the Unicode rules, but a browser with older Unicode data may split a brand new emoji into parts, and a browser without Intl.Segmenter cannot give that count at all, which the page says when it happens.