refactor registrants counting