Goldman Sachs Interview Question

Repeated characters string encoding (aabbbc -> a2b3c)