How can I limit the number of participant roles?
You should use CiviVolunteer to manage and track volunteers for your event. Your requirement works our of the box with CiviVolunteer

https://civicrm.org/extensions/civivolunteer