TarekSmaili:
so i edited the code a bit and when i tried to simulate on tinkard.com the counter doesn't work properly
That is still not an adequate description of the problem. Do you get anything on the LCD? Does it count backwards or skip numbers or something?