how to save counter on lcd in mikroc
You could add non volatile memory to your project, but I think that would be overkill since the amount of space would be more than necessary. You could also write the data to EEPROM, but since there are a finite number of writes to it, I don't know if you would want to use it. Third option, you could add a real time clock, just to keep the memory alive. You would still keep it powered, but just in a sleeping state so the memory is retained.