There are two sexes, based on whether or not a Y chromosome is present. However, there are an arbitrary number of genders, which are themselves quantities with an arbitrary number of dimensions.
Point being, sexes are something Nature made up for purposes of propagation, while genders are something we made up for purposes of classification.
Yep, a good reminder that fixed natural categories are another thing that we like to invent (and when we feel it necessary, impose by force), where they seldom exist in reality.