Turkey has a central database, called TCKN, that everyone is assigned by birth or by getting an immigration visa. The births and deaths are tracked by hospitals and the Revenue Service. Income / education / housing - all of these are tracked by the central registers and licensing boards. Every Turkish citizen and resident has an online account at https://www.turkiye.gov.tr/?lang=en_US (for English version) which you can use to view taxes paid, your previous health records (MRI scans and all should be downloadable) see scripts fillable, paperwork for legal action by you or against you, census records, even mobile and landlines registered on your name, and basically pretty much everything you’d expect a state can do. All of the outputs from this site are printable PDFs and they have a barcode on them which I think the government cryptographic signature. So you can get some doc from here, print it out and bring to someone else and they’d be able to verify it by scanning the barcode.
In other words, they have total knowledge. It’s not just the number of people in the country. What’s interesting is that it doesn’t rely on self-reporting, but on ambient data providers. It’s kind of dystopian, but technically fairly impressive and so far (ominously) relatively benign. Failing all else, it’s very useful.