Is there a command to query how many chunks make up a given world? (v1.15.2)

Solution 1:

To answer my own Question, there isn't a vanilla Minecraft Command to retrieve the total chunks that have already been generated by the server.jar.

There is, however, MCA Selector. It's a tool which can be used to edit a Minecraft world with a top-down view. MCA Selector also has a readout of block and chunk coordinates which can be used to derive the area of chunks generated previously.

Solution 2:

For an upper bound, you can look at your Minecraft data folders, specifically in your world folder in saves the folders region, DIM-1/region and DIM1/region. Each file in those contains up to 32×32 chunks, so your maximum is 1024 times the number of files there.

For more details, you could use NBTExplorer. It shows you all the chunks that are actually contained in these files. But that's a very manual process, so the other answer is probably better.