Unbalanced characters could be missed in counter