Count consecutive characters in a string

Same as run length encoding