How many Wikipedia pages with over 4000 different words are there on the Catalan language?
lid = 1 means it's Catalan language; over 4000 different words means words > 4000; Wikipedia pages refers to pid
SELECT COUNT(lid) FROM pages WHERE lid = 1 AND words > 4000