Coforge Interview Question

Write a code to count each character from string