Pregunta de entrevista de Chargebee

String manipulation like count repeated char in string