We were attempting to insert emojis into our database, but were encountering weird behavior. It turns out this has to do with utf-8 encoding. 👍 would work fine, but 🌶 would not. This is when we learned about utf-8 code points. 👍 is a single code point long, but 🌶 is 2: consisting of Hot Pepper (U+1F336) and Variation Selector-16 (U+FE0F).
After learning of this, we increased the database storage width to 2, which fixed the problem for 🌶, but we found a new problem. Keycap emojis (1️⃣2️⃣3️⃣) are 3 characters: One (U+31), Variation Selector-16 (U+FE0F), and Combining Enclosing Keycap (U+20E3).
"Fine," we said, "Increase it to 4." Then 🤦🏼♂️ came in with 5 code points: Face Palm (U+1F926), Emoji Modifier Fitzpatrick Type-3 (U+1F3FC), Zero Width Joiner (U+200D), Male Sign (U+2642), and Variation Selector-16 (U+FE0F). We tried a lot more and found England's flag 🏴 to be made of 7 code points:
So the question is, what's the greatest number of codepoints that a displayed unicode character can use? Are there any examples of emojis (or other utf-8 characters) with higher than 7 code points?
This question is similar to, but different from, the question What is the maximum number of bytes for a UTF-8 encoded character?. That asks for a single UTF-8 codepoint, what's the maximum number of bytes? (Spoiler: 4). This question shares a similar title to Does Unicode have a defined maximum number of code points?, but that's asking how many different code-points exist. Not how many can be used in a row to make up a single character displayed on the screen.
You haven't gotten to the long ones yet....
There are two short answers for your question:
These are ZWJ (Zero Width Joiner) sequences, and are generally the longest emoji sequences in the recommendation. You can get the currently recommended list in emoji-zwj-sequences.
The longest sequence that I've seen discussed, but is not part of the recommendation, is 11 for a skin tone modified family sequence (for example, woman-medium-zwj-woman-dark-zwj-girl-light-zwj-girl-medium). This sequence would almost certainly crush Unicode (supporting it would add over 4000 new glyphs), so it's unlikely to ever be in the recommendation.
But just because it's not recommended does not mean it's not legal. I can combine an arbitrarily large number of people together into a family sequence, attaching gender, hair color, and skin color to each, and it's a legal sequence and will render as a single "character." For example, this is the family emoji with skin-tone modifiers discussed above: 👩🏽👩🏿👧🏻👧🏽 It renders as four people, but if your text engine works correctly, you will find it selects as a single "character" because it is. There just isn't a special glyph for it in any common font.
I can also add other modifiers without limit, and you can add them to arbitrary characters (not just emoji). For all the gory details see UTS #51: Unicode Emoji.
And then you opened up the further question of "or other utf-8 characters." That's really about combining characters, and that introduces:
Unicode puts no limit on the number of combining characters that can be attached to a single "starter" character.
However, Unicode does define a Stream-Safe Text Format, which puts a limit of 30 combining characters per "chunk." (It does actually allow additional combining characters by interposing a COMBINING GRAPHEME JOINER, but these are normalized separately.) A complete chunk will not contain more than 32 characters total, and will not require more than 128 bytes to encode in UTF-8.
As the spec notes, "the value of 30 is chosen to be significantly beyond what is required for any linguistic or technical usage." The largest I've heard of is 8 combining characters in the Tibetan HAKṢHMALAWARAYAṀ (ཧྐྵྨླྺྼྻྂ). That's one character. (That said, while I've seen this particular example thrown around a lot, I've never seen anyone describe how it is used by Tibetans, so I cannot confirm that this is actually a real character.)