I track web visitors. I store the IP address as well as the timestamp of the visit.
ip_address time_stamp
180.2.79.3 1301654105
180.2.79.3 1301654106
180.2.
Select Z.IP, Count(*) As VisitCount
From (
Select V.IP
From visitors As V
Left Join visitors As V2
On V2.IP = V.IP
And V2.time_stamp > V.time_stamp
Group By V.IP, V.time_stamp
Having (Min(V2.time_stamp) - V.time_stamp) >= 10
) As Z
Group By Z.IP
This counts any visit where the next entry is more than 10 seconds away as a new visit.