I have this piece of jQuery that currently increments a number by one every 5 seconds. The problem I have is that its client side, therefore it resets every time you refresh
Can you store counter in cookie.
document.cookie = counter.
so you can get last value from cookie, if user refresh the page.