There are two human sex chromosomes, X and Y. Most humans either have two Xs (XX) or one of each (XY). But you can’t extrapolate the number of human genders from that fact, for three main reasons:
1. Not all humans are XX or XY. Some are XXY, X (alone), XYY, XXX, or XXYY. These are associated with various physical traits but it’s not absolute. Unless you’ve been tested, you don’t know your own karyotype for certain.
2. Sex chromosomes are the main genetic factor determining biological sex. But like most genes, they don’t explain 100% of the variation. XX humans can have male bodies. XY humans can have female bodies. Some people are intersex, with physical features in between male and female.
3. Gender is a social and psychological phenomenon that is distinct from biological sex. It’s correlated with genetics: tell me your sex chromosome karyotype, and I can guess your gender with pretty decent accuracy. But there is no 1-to-1 connection.
Everything in biology shows natural variation, but our minds really want to pigeonhole it into discrete categories. Saying "men are XY and women are XX" is a convenient shorthand, and usually true. But don’t confuse it with the complete truth, or the way things "ought to be".
Here's sex variation in wild strawberries. I realize humans≠plants, but see how categorical thinking can oversimplify things. Fruit production (♀fertility) is bimodal & inversely correlated w/ pollen production (♂fertility). But just saying "there are two sexes" misses a lot.
Bigotry of all sorts (sexism, racism, homophobia) involves drawing clear demarcations between groups of people. But biological reality is messy, and the borders aren’t nearly as well-defined as many think. If someone claims that science supports their prejudice, they’re wrong.