Persistent Systems Interview Question

Programming: You are given a string ex: aaaabbbccdddddeff The output should be: a4b3c2d5ef2