I solved this problem when I coded my counter by creating a file where visitors IP and time are saved. When the script is executed it will compare values in the file and values sended by visitors browser.
Here is a piece of that code. I typed it from memory so I don't guarantee it will work correctly.
$time_limit = '60'; // in seconds
$visit_log = '/path/to/visit.log';
$visits = file($visit_log);
foreach ($visits as $visit) {
list($ip, $time) = explode('||', $visit);
if ((getenv('REMOTE_ADDR') == $ip) && ($time + $time_limit) > time()){
$do_not_increase_count = 1;
}
}
if (!$do_not_increase_count) {
// place here your piece of code which increases the count number
}
else {
// place here your piece of code which prints the count number
}
I can post the piece of code from my working counter script if this doesn't work.