input: Write a function to compress a string using the counts of repeated characters.
  assert stringCompress('aaabbccccca') == 'a3b2c5a1'
  assert stringCompress('aabbcc') == 'a2b2c2'
  assert stringCompress('abc') == 'a1b1c1'
output: def stringCompress(s):
      if not s:
          return ""
      
      compressed = []
      count = 1
      for i in range(1, len(s)):
          if s[i] == s[i-1]:
              count += 1
          else:
              compressed.append(s[i-1] + str(count))
              count = 1
      
      compressed.append(s[-1] + str(count))
      return ''.join(compressed)