I read somewhere, probably here, that the APA has identified 56 gender types. 56! I guess chromosomes aren’t part of the criteria anymore..
The word “gender” was adapted by psycho-quacks from the “gender” of nouns in Romance and certain Germanic languages (whether masculine, feminine or neuter). Since it doesn’t really mean the sex of a person but rather his/her nativity or “birth”, they abused it to mean whatever they want it to mean.