So I assume you want the number of people born in each month.
The first data set creates some test data.
data test;
format Gender $8. Birthdate date9.;
do i=1 to 5000;
gender="MALE";
Birthdate = today() + ceil(ranuni(123)*365);
output;
end;
do i=1 to 5000;
gender="FEMALE";
Birthdate = today() + ceil(ranuni(123)*365);
output;
end;
drop i;
run;
proc sort data=test;
by gender;
run;
data output(keep=gender month:);
set test;
by gender;
array Month_[12];
if first.gender then do;
do i=1 to 12;
month_[i] = 0;
end;
end;
month_[month(birthdate)] + 1;
if last.gender then
output;
run;
Creates