>>10911240Sex is a phenotype determined by sex chromosomes. XY, XXY, XXXY are male, and X, XX, XXX, XXXX are female. I'm not sure about how intersex comes about, so I can't comment, but I'm sure it would have something to do with their genetic make-up.
This PhD has clearly defined "sex" differently, so they are not necessarily wrong from this explanation.