compression using the count of repeated characters