Ya esta, le agregue un contador al código de toforo.
Código PHP:
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$fp = file_get_contents("ip.txt","r");
$exp = explode(';', $fp, -1);
$total = count($exp);
if (preg_match("/$ip/i", "$fp")) {
$visitante = $total;
}else{
$fh = fopen("ip.txt", 'a');
fwrite($fh, "$ip;");
fclose($fh);
$visitante = $total+1;
}
echo "Visitante nº: $visitante";
?>