Is there a method to count how many Regions tiles exists in a map?

I'm using Galv Event spawner wich uses Regions to spawn events on.

If I could for exemple count there's 3 x R25, and 2 x R26, it would help me a lot.

Anybody knows if it's possible?
Regions aren't tiles, but numbers assigned to tile coordinates. And as such, even Region ID = 0 is a region.
The only way to count how many of those numbers are a specific ID would be a loop checking every region number through the map.

That is possible, but I don't think that a default method exist, it would have to be written as a common event or as a script.
give me about fifteen minutes, bud. i will do this for you right quick.

edit
while i do the foundation, how is it that you want to use this data? do you want to store it in variables, or what?

edit
i am done with this; i just need to have an idea of how you want to use the data once you have it; i.e. does it need stored in a variable, or are you only planning to use it in conditionals, etc.
Damn I'm a bit late.

Galv Event Spawner uses a Spawn Map where you put your events,
with a script you can then spawn an event with its ID to a Region, on any other map.

My current plan is to place a certain amount of R25 on a map. My current common event rolls a VAR,
if it's 1, it spawns an ID10 event
if it's 2, it spawns an ID 11 event
etc...
I will use a lot of different Regions for different categories.

Now I need a system to count how much R25 there is, so I can repeat the spawning until all the R25 are filled.

I did not check Adar solution yet I just came back.

Edit: I think I would use your thing dbchest rather as contitional check. Like "if R25 number > 0, do loop" and "if R25 = 0, break loop"
(sounds like a variable that gets diminushed but I'm not sure)
use the following script call within the "Control Variables" event command to store the region id count into that variable:

$gameMap.regionCount(specify desired region id here).

DOWNLOAD
Gonna experiment with it, will do another post to tell you how it is!
@Narch you should not experience any problems; that function will return the full count of however many times the region id you specified has been applied to tiles in the current map. using it within the variables event command will allow you to store that value and perform your common event processing with it.
Hey. It works perfectly so far! This is cool you went and coded it, thanks a lot!
Hi, I was looking something kind of similar, I wanted to know if there's a way to check WHICH Region numbers have been used already, I use Galv Event Spawner too and I need to keep track of my regions in order to not use them twice for different events.
@Alberto Palacios for "something kind of similar" (but not the same) requests you really need to start your own support thread. What you're doing here is known as hijacking the thread, and it's a no-no.

(Forum rules are over here, by the way.)

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-method-to-count-how-many-regions-tiles-exists-in-a-map.87839/