I think what you are really looking for is a GROUPing:
SELECT url,id,count(*) FROM log GROUP BY url,id ;
The number of records returned is the NUMBER if different url/id pairs. The
value of count(*) in each record is the count
for that particular pair. Hope this helps
len morgan