There are more than two genders. Allow me to explain.
"Gender" is how one feels they are, regardless of sex. One example is being "non-binary"; a blanket term for those who feel niether male nor female. Someone who feels "trans" mean they feel like different then their sex; such as a man who identifies as non-binary, or a woman who identifies as a man. "Sex" refers to what a person was born as. Contrary to popular belief, there aren't even two sexes; there's the well-known male and female, then there's intersex (a rare occurrence in which one is born with both male AND female sexual organs), and sexless (a VERY rare occurrence in which one is born without any sexual organs and does not go through puberty without special medication). It all depends on what you think classifies as a "sex".