Coforge interview question

Write a code to count each character from string