PROC PRINT prints the RANKPAIR data set. The N option prints the number of observations in each BY group.
proc print data=rankpair n;
   by gender;
   title 'Pairings of Swimmers for Backstroke and Freestyle';
run;