In PHP you can can do like:create a hidden input tag to store the count value and pass with submitted data so that when page is refreshed then you can get the count value from submitted value of count.