Nace Partners interview question

Given a string “aaaaabbbbcc” return “a5b4c2”