First, sex defined: We're talking physical sex here, not gender. Body parts, hormones, and genetics (and more).
BLUF: BIOLOGICAL sex is a spectrum
The IDEA is, XX is girl, XY is boy, right?
But the model sort of... almost predicts a lot of things, and it worked for years, so...
Yes, we looked at other things we could do to make our data fit the existing model, that's how science works! The ONLY way the data fit was if we let "sex" be more than just those two narrow peaks.
"Intersex" is a grouping bin used for a lot of the "middle ground" of the spectrum between the "male" and "female" peaks. Any situation where easily assigning the person to one of those two peaks is challenging.
"Intersex" is a term used to collectively speak of the "middle ground" of biology where people can't easily be binned into those two big "male" and "female" peaks. It can include a large range of biology
Current estimates are that the intersex population is at least 2%. We know that's low because there are a lot of "invisibly intersex" people. That means AT LEAST 150 million people in the world.
It's important to note that there are other people who traditionally haven't fallen into the "intersex" category, but also don't fall into the clearly defined peaks either.
But I can provide some more sources for those actually interested. They include some fairly heavy duty science, but some are open access/free for all
These deal with the fact that the sexually dimorphic brain, similar to most sex differences, does not fall into a hard binary readout - but rather is on a continuum or spectrum with each cell and each brain region comprised of varying degrees of ‘male' and ‘female'
Joel D, McCarthy MM (2016). Incorporating sex as a biological variable in neuropsychiatric research: where are we now and where should we be? Neuropsychopharmacology ncbi.nlm.nih.gov/pubmed/27240659
Springer KW, Mager Stellman J, Jordan-Young RM (2012). Beyond a catalogue of differences: a theoretical frame and good practice guidelines for researching sex/gender in human health. Soc Sci Med 74: 1817–1824
Joel & Sterling 2016. Beyond sex differences: new approaches for thinking about variation in brain structure and function. Philos Trans R Soc Lond B Biol Sci. 2016 Feb 19; 371(1688)