Problem with if/else

Hello
Let run a "{" vs "}" counter simply.