Write a function that performs a basic string compression using the counts of repeated characters.
For example, the string aaabbc would become a3b2c1.
You can assume the string has only lowercase letters (a-z).
"aaabbc"
"a3b2c1"
'a' is repeated 3 times, 'b' is repeated 2 times, and 'c' is repeated 1 time.
"aabbcc"
"a2b2c2"
Each character is repeated 2 times.
"abc"
"a1b1c1"
Each character appears once.
"aaabbc"
"a3b2c1"