How to limit the tag time of RFID card?

I am a student. I am making a project with RFID card.

My project is Ticket System. With a Master Card, I want to allow others card as a customer.

Here is my problem start. I want to allow for a card for only 5 times after register.

My reference code is from Arduino software/Expample/MFRC522/Access Control.

I am trying to learn EEPROM too. But I cann't do this yet.
Please help me out.
Sorry for bad English writing