Right up until the 1970s, the word gender was completely interchangeable with sex. It was only once the political zeitgeist grew to be more accepting of transgenderism that there was a need to split the terms, and gender got chosen to mean one's perception of sex rather than their sex itself. Accordingly, gender used to have a much more biological meaning, and has its roots in science. It was borrowed in the fourteenth century from the Old French word gendre, which could mean either "gender" or "species", in an academic context. From here, we can trace it to Latin genus, which had an even broader definition of "kind", "type", or "sort" (also the source of genre). Through Proto-Italic genos, this may be reconstructed to Proto-Indo-European genh, a root meaning "to produce" (as in, classifications are produced) and also the source of words as diverse as genome, natal, eugenics, nation, Renaissance, cognate, oxygen, and much more. I guess you could say there are many types of genders.
Adam Aleksic, a rising sophomore studying linguistics and government at Harvard University, has been described as the internet's sixth most famous etymologist. He also has disturbing interests in politics, vexillology, geography, board games, conlanging, and law.