Special String reformatting
APL (Dyalog Unicode), 7 bytes (SBCS)



Anonymous tacit prefix function.

,,∘⍕∘≢⌸


Try it online!

⌸ apply the following function between each unique character and the indices where it occurs:

 , concatenate the character

  ∘ to

   ⍕ the stringification

    ∘ of

     ≢ the indices' count

, flatten