SAP Interview Question

Write code to count the letters