Pergunta de entrevista da empresa ALSTOM

Write a program to replace a character with another character along with the character count. Ex: input - Good Day output- GooX X1ay