A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Let's say that the headers are in row 1 and the data in rows 2 through 100. And also that gender is in column B, stored as "Male" or "Female".
You can then use the following formula (borrowed from Aladin Akyurek) to count the filtered number of male students:
=SUMPRODUCT(SUBTOTAL(3, OFFSET(B2:B100, ROW(B2:B100)-MIN(ROW(B2:B100)), , 1)) * (B2:B100="Male"))