What's the best practice for creating doors that need "X" items to open?

Howdy,
I’m wondering what the best practice/approach is for creating a system where certain “doors” are locked until the player gets “x” amount of items.

Basically; my game is going to be structured where there are different “worlds” locked behind doors in the HUB world. There will be a certain item scattered amongst levels that the player needs to collect in order to access the next “world” in the HUB. So in order to play levels in “world 02” the player will need to collect “x” items from “world 01”.

Each world will require it’s own amount of item based on color.
Example: world02 might need 200 red collectibles, while world03 needs 500 blue collectibles.

How would I go about storing the collected collectibles in a way that is modular and scalable? Or what would be the best way for going about such a system?

I’m currently using an interface & actor component. But what is the proper way to store the collected amount of individual colored items needed to open doors? I will need to keep track of multiple child actors amounts (each color) collected throughout a character save profile.

So far collecting the item & playing a sound when “x” collected is working as intended. But I’m uncertain on how to expand this further to my needs.

Create a Struct the holds the Requirements and the current amount collected for each.
Save this in a Save Game.

In the lobby you load the save game and then use those values to determine access.

If I could add to the question: What would be the advantage of using a struct over a map (Name/int)?
I’m asking because people do seem to use structs a lot and I don’t really see the difference to a variable like a map other than you will be able to put in more different values in a struct.

Maps are bound to a single Name : Value pairing, while Structs are not.