Tech Mahindra Interview Question

Write a code to count the frequency of characters in a string .