Counting The Number Of Maps In A Game?

Hello again, everybody-

Quick question- is there a script call to count the total number of maps in the game?

I have tried to Google for an answer and go over the RPG Maker Library but came up with nothing.

The only other way I can think of is to write a function to count the Map***.json files in the /data/ folder, but before I do this, I just wanted to check there wasn't an easier method.

Thank you for your help!
There's no built-in method to count maps, but it shouldn't be too difficult to build one.
There's no built-in method to count maps, but it shouldn't be too difficult to build one.
Thanks, @Poryg - Any suggestions better than my idea about counting the JSON files?
Well, the maps are stored one per file in the data directory. According to windows explorer, there's 14 non-map database files, which should be the same for any project unless you stuck something else in the folder. If I select everything, there's 48 items, so I have 34 maps.

You're still technically counting json files, but all you have to do is open the folder, hit ctrl+A, read a number in the lower left, and subtract 14.
Thank you @Doktor_Q - this is what I was going to do. I was just seeing if there was a way to do it using the Libraries instead.
Open the console in game using f8 and type in $dataMapInfos. That shows you all necessary info and can be worked with using code.
Open the console in game using f8 and type in $dataMapInfos. That shows you all necessary info and can be worked with using code.
@Poryg - thank you, exactly what I was looking for! Many thanks!

Original thread: https://forums.rpgmakerweb.com/threads/counting-the-number-of-maps-in-a-game.109455/