Need help with emerald counting

So, I've made up a game for Sonic FCs and it's possible to collect all of the Chaos Emeralds. Depending on how many Chaos Emeralds you have affects the game, battles and the ending. What's the best way for the game to know how many Emeralds you have?
You use variables - that's what they are made for.

And then you can check different variable values as conditions for events.

If you don't know how to use variables, search for the "Variables Guide" (It's linked in my starting point tutorial for example)
Thank you. I checked out the Variable Tutorial game. It's quite helpful. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-emerald-counting.45467/