From a genetic point of vierw there are 2 genders, depending on whethere there is an Y chromosome present or not. In most cases there are XX and XY, but there are a few variations such as X0, XXY and such. Still, it's the presence of an Y chromsome that determines genetic gender. (There is a phenomenon called "mosaic", where the cell population is divided into groups with different chromosome patterns. In most cases it's XY and X0. These cases are rare).
But, while the chromosome pattern is basically binary (Y and non Y), the expression of the chromosomes and genes will differ (sometimes the result of normal variation, sometimes caused by disease), introducing a continuum. But this relates to anatomy and the effect of sex hormones, and should, while not completely unrelated, not be mixed with psychological aspects of gender.
I think what I'm trying to say is that there are 3 issies here:
1. Genetic sex (genotype), which is binary.
2. Sexual anatomy and physiology (phenotype) which varies
3. Sexual identity and orientation which varies perhaps even more.
In the case that started this thread, if she has testicles (whether they are inside or outside the abdominal cavity), I can't see how she could be genetically female, as the development of testicles require an Y chromosome. Unless there are mechanisms I'm not aware of. Whether she as an athlete should be considered male is another issue. If she has female sex organs, she either have been exposed to significant amounts of estrogen, or her tissues are relatively insensitive to testosterone. And I've not said anything about how she identifies herself (I assume she was raised as a girl).
And for what it's worth: The "problem" of female atheletes who in some ways are males is penuts compared to the problem of doping. So maybe we shouldn't ask the question at all.