CREATE TABLE Country (id VARCHAR, name VARCHAR)
CREATE TABLE League (country_id VARCHAR)

How many leagues are there in England?
SELECT COUNT(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = "England"
SELECT COUNT(*) FROM "Country" AS "T1" JOIN "League" AS "T2" ON "T1"."id" = "T2"."country_id" WHERE "England" = "T1"."name"