How many tourist attractions are there?
select count(*) from tourist_attractions
For each attraction, how many visits does it have?
select t1.name, count(*) from tourist_attractions as t1 join visits as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id group by t2.tourist_attraction_id
Please also show the ids of these attractions.
select t1.name, t2.tourist_attraction_id, count(*) from tourist_attractions as t1 join visits as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id group by t2.tourist_attraction_id