Just create a Code datatype, create a new record, assign it to the user, use a field in the Code datatype to track the number of times it is used by other users.
You can check that number when you need so and act accordingly when it has reached the limit.