There are two genders: male and female. In addition, there are a number of birth defects resulting in people with partial genitalia of both sexes. These people used to be called hermaphrodites but the term commonly used today is intersex.
I had a friend who was a hermaphrodite. At 11 his parents made the decision to have him "fixed" as male only; ie, removed all the vestige of female organs. It mentally, negatively affected him. So now he was physically male but mentally female, so therefore, he was gay. Well, kinda.
He got married and had three daughters back in the 60's . In a very conservative state, before the closet door was opened - this was what be was suppose to do. Then the door opened and he came out. His dauughters preferred to live with him, btw. Their mother was a real beotch.
He got caught stealing and went to prison for a few years. Well, he got raped in there a number of times and contracted AIDS. This was pretty mentally debilitating for him also as can only be imagined. I first met him in 1990 and he died in 1993-4. He was a real nice guy and a great artist also. My life is richer having met him and I cherish a statue he sculpted and gave to me.