in reply to count consecutive characters

Thanks both for replies, i've implemented Moritz method since it worked :) Thank you!