Adobe Interview Question

given String x="ahdhfjsjd" write code to get output of character with count like "ah2d2fj2s"