To tell the truth, sometimes just write the doubt to note how stupid it sounds. You're absolutely right, KCC, my question is completely pointless.
I was making my player interact with the game keys; basically an array keys = [false, false, false, false] and each time the player took a key from the map, it would turn one of the array values to true and so on until all keys == true total, freeing a port.
but if I do with a numeric VAR it's easier, better and faster, just by considering the total number of keys as a value and decreasing -1 for each key collected, until the VAR is zero and open the door, or anything in this sense.
Thanks a lot anyway, KCC, you helped clear my thoughts.