Microsoft interview question

Count the character values in a string using a counter