How do I get the correct length of a string of emoji?

See if this helps...