This video from the programmer and linguist Tom Scott points out something I’d never realised about twitter:
Essentially, what it counts as a character is not necessarily a letter or a punctuation mark. Sometimes Unicode, the system which is used to standardise writing across programs and website, will encode particular common combinations of letters with a single character. عليه السلام is apparently one of them.
Disclaimer: I’ve tried and failed to replicate this myself. However, I did manage something similar but less elegant with some English words.