First you have to define "having sex". As President Clinton taught us, it is difficult to define this. To clarify:
If a male & female have intercourse, and he has an orgasm, but she doesn't, did she have sex? Did he? Did both?
If they have intercourse, and SHE has an orgasm(s), but he does not, did he have sex? Did she? Is the action of "normal" sexual intercourse the (or one of the) defining actions?
What if they didn't have intercourse, but one of them has an orgasm from some activity while the other does not, did either or both of them have sex?
I think most people would consider and probably disagree about whether "sex" only involves sexual intercourse, and whether one has to have an orgasm for it to be properly considered to be "sex".
For example, if a male is caressing a female, and she has an orgasm, did she have "sex" or not? Does she have to be unclothed, or does he have to have direct contact with her? Did he have sex?
If you just have a prolonged hug or cuddle, without any orgasms, did anyone have "sex"?
__________________
Starting with my early teenage years, and continuing in recent years, I had a variety of intimate relations with females during which neither of us had orgasms. I've had others in which she had orgasms -- sometimes the most intense orgasms of her entire life -- but I didn't. I think of all of these as shared sexual experiences, but I think many people (including Pres. Clinton) would claim this is not sex.