Pergunta de entrevista da empresa Optum

write a function that accepts a string like 'aabcaabcbc' and returns '4a3b3c'