i'd say the best way to do this is to start a session, store something in it to say the user has just entered your site. like:
session_start();
$time = time();
if (!isset ($_SESSION['lastvisit']) or $_SESSION['lastvisit'] < ($time - 1200) ){
add_visitorcounter();
}
$_SESSION['lastvisit'] = $time;
what this thing does is to check the session, if there is stored a timestamp that points out the user has last visited less than 20 minutes ago, it doesn't add anything.