Many countries effectively have a live registry of where people live, updated to within a few weeks.
A door to door census isn’t needed because they can do something like:
SELECT a.province, COUNT(DISTINCT b.id_num)
FROM registry a
INNER JOIN national_id b
ON a.nat_id_num = b.id_num
WHERE timeframe = 2026-01-01
GROUP BY 1