Goldman Sachs interview question

Repeated characters string encoding (aabbbc -> a2b3c)