Counter with decrement operator not working (SOLVED)

why do you redefine "pocet" locally when it is defined globally;