National Statistics Office (NSO) annually (in past sometimes bi-annually). Quite a lot of the statistics in these books are really specialized, whereas the population numbers I already took from the census reports and the registration data. There is however one table which turns out to be useful - the number of administrative units of each type for each province. For some recent years I could even find this table as a Excel sheet, which made it most easy to translate to my XML structure.
Using the Royal Gazette, I believe I already have all the data on creation of districts and subdistricts from about 1950, however for the administrative villages they only became published in the Gazette since 2004, so only source for these numbers so far were the census reports. However, these lists help to check for any discrepancy, for entities created or abolished without announcement in the Royal Gazette.
There is however one problem - those books are of course available in several Thai libraries but as I am not living in Thailand they are hardly reachable for me. The NSO has an online library, but that still has by far not all issues of the yearbook, but even worse for many of those available the pages with this specific table are missing, often only the table of contents is displayed. For example for 1964, the last available page is number 32, luckily the table with the entity numbers end at page 31.
The most strange issues with the entity numbers was the number of subdistricts, which according to my data should have be 7256, but in the annual lists from the Department of Provincial Administration always listed as 7255, which made me believe that the subdistrict Pak Phanang in Nakhon Si Thammarat might have been dissolved as there more some contradicting values for the number of subdistrict in this province. Looking at the lasted yearbook, it lists 7425 subdistricts, including those in Bangkok this makes 7256 again. Thus it seems the confusion is within DOPA itself, both for the population statistics and the reports to the NSO they use the number of 7256, but in their own annual report for whatever reason one Tambon is omitted.