Sendoso Interview Question

I was asked to write a string character counting code.