Maybe 4?
How many games do you have to abort to get banned?

If there wasn't a limit players could abort on move 1 because they didn't like their opponents rating. Or, as black, because they didn't want to play against whatever white made as the first move.
As to how many times you can abort without some kind of negative repercussion -- just don't intentionally abort games and you'll be fine. If you have to ask because you want to approach the maximum limit but not go over, you're entirely missing the point -- I'm pretty sure you'll never be given an absolute # by chess.com staff for that exact reason.

General site related questions really should be in the general forums or Help and Support club.
https://support.chess.com/article/627-sportsmanship-policy
Basically, if you abort too often, you lose the ability to do it

I've aborted a few games because of the lousy UI when entering a custom time control -- don't get me started about that. They allow for a certain number of goof-ups like that without announcing what the limit is. So long as you're not doing it intentionally you should be fine.

I knew a guy who really wanted to try a new chess trap he learned as White, but kept on getting Black. He kept aborting and was banned because he couldn't wait for like two games.

Oh... lol, I thought this was the help and support club. It looks like you posted the same question in beta and in help and support? ...

I knew a guy who really wanted to try a new chess trap he learned as White, but kept on getting Black. He kept aborting and was banned because he couldn't wait for like two games.
And he deserved his ban.
If one wants to do that, learn how to put out game requests for a specific color. It's not that hard to do.

How many games do you have to abort to get banned? How do you know how many games you have aborted so far?
This is definitely a strange question. But why not be our guinea pig and find out?

How many games do you have to abort to get banned? How do you know how many games you have aborted so far?
This is definitely a strange question. But why not be our guinea pig and find out?
Naw bro don't risk it

I knew a guy who really wanted to try a new chess trap he learned as White, but kept on getting Black. He kept aborting and was banned because he couldn't wait for like two games.
And he deserved his ban.
If one wants to do that, learn how to put out game requests for a specific color. It's not that hard to do.
Yeah I told him that

I have aborted like 4 and have not gotten banned (more than that actually I think). It happens like once a week cause I have to go somewhere when I start or if I start by mistake and don't have time to play
I didn't know there were repercussions- good to know or else I would've continued aborting and would've gotten banned lol

I knew a guy who really wanted to try a new chess trap he learned as White, but kept on getting Black. He kept aborting and was banned because he couldn't wait for like two games.
I sympathize with him, because I wanted to try out a new line in the Alapin but I was at the rating where everyone plays a different sideline
Still, aborting won't fix that because if you abort as Black, it doesn't mark down that you played a game as Black so you still won't be any more likely to get a game as White next move.

General site related questions really should be in the general forums or Help and Support club.
https://support.chess.com/article/627-sportsmanship-policy
Basically, if you abort too often, you lose the ability to do it
But will your account get banned?
How many games do you have to abort to get banned? How do you know how many games you have aborted so far?