Do you mean that you want to create a count of observations for the two possible values of gender?
A SQL approach would be
proc sql;
create table want as
select
'Male' as gender length = 6,
count(*) as count
from have
where gender = 'Male'
union all
select
'Female' as gender,
count(*)
from have
where gender = 'Female'
;
quit;
Note that this is very much a waste of code space and performance as this will do the same:
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and save with the early bird rate—just $795!