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.
Make a left join against the records with the same ip and a close time, and filter out the records where there is a match:
select count(*) as visits
from (
select t.ip_address
from tracking t
left join tracking t2
on t2.ip_address = t.ip_address
and t2.timestamp > t.timestamp and t2.timestamp <= t.timestamp + 10
where t2.ip_address is null
) x