<?php
include("config.php");
session_start();
if(!isset($_SESSION['hits'])){
$select = mysql_query("SELECT * FROM `table` WHERE ID = '1'");
$query = mysql_fetch_assoc($select);
$_SESSION['hits'] = $query['hits'];
$_SESSION['hits']++;
mysql_query("UPDATE `table` SET hits = ".$_SESSION['hits']." WHERE ID = '1'");
}
?>
Put that into each page and it will count unique hits beautifully
.