#Japt v2.0a0 -P
, 14 bytes
f\l üv ñÊ®ÌiZÊ
f\l üv ñÊ®ÌiZÊ
:Implicit input of string
> e.g., "Kitkat Tango"
f :Split to an array of characters
\l : Matching RegEx /[a-z]/gi
> ["K","i","t","k","a","t","T","a","n","g","o"]
ü :Sort & group (Preserves original order within each group)
v : By lowercase
> [["a","a"],["g"],["i"],["K","k"],["n"],["o"],["t","t","T"]]
ñ :Sort
Ê : By length
> [["g"],["i"],["n"],["o"],["a","a"],["K","k"],["t","t","T"]]
® :Map each Z
Ì : Last element of Z
> ["g","i","n","o","a","k","T"]
i : Prepend
ZÊ : Length of Z
> ["1g","1i","1n","1o","2a","2k","3T"]
:Implicitly join & output
> "1g1i1n1o2a2k3T"