Five goals were scored in Atlanta United’s game against NYCFC on Sunday at Mercedes-Benz Stadium.

Four counted in the 2-2 draw.

Two were unbelievable pieces of skill.

Just one counted.

As Atlanta United’s Chris McCann said after the game: VAR (Video Assistant Referees) gives and it takes, and he recognized the irony after it changed a red card he received last week against LAFC to a yellow card.

But the goals, whether they counted or not, were fantastic.

The first, which didn’t count, was Darlington Nagbe’s one-timed shot from 22 yards in the first half. The play started on the left with Josef Martinez taking on an opposing player. He looked up and saw Julian Gressel steaming down the right. Martinez clipped the ball across the penalty box to Gressel. The German looked up and saw Nagbe trailing the pack of players rushing into the penalty box. Gressel’s pass was perfect and Nagbe’s shot, taken from the middle of the pitch, slammed into the left side of Sean Johnson’s goal.

Atlanta United’s players began celebrating Nagbe’s first goal with the squad.

Few noticed referee Allen Chapman putting his hand to his ear, the signal that the VAR officials were talking to him.

Chapman ran to the monitor behind the goal, watched the replay for just a few seconds, came back onto the field and signaled that the goal was being disallowed.

Why was the goal disallowed?

After Martinez passed the ball to Gressel, he continued his run into the middle of the penalty box. As NYCFC’s defenders stepped up the field, Martinez was left behind, standing next to Johnson. Chapman ruled that Martinez committed an offside offense, which is another way of saying that he interfered with Johnson.

Atlanta United manager Gerardo Martino, no fan of VAR, said, “It was a goal. He could have been offside, but I don’t think that if there were three or four goalies in the net that they would have stopped it.”

Nagbe was more diplomatic, saying, “I haven’t seen it yet. If he was in front of him and screening him. ... I haven’t seen it yet.”

NYCFC manager Patrick Vieira said he also wasn’t sure what was going on in the seconds after the goal.

“I was asking the fourth referee about what was going on,” he said. “I’m glad because I think this is what the VAR is. It is trying to help the referees make the right decision. That was an important goal, and I am glad that it went in our favor.”

The second goal was a once-in-a-lifetime 25-yard shot from Alexander Ring in the 73rd minute that skidded off the crossbar and into Brad Guzan’s goal to tie the game at 2-2.

The play started with David Villa dribbling for several seconds, first taking on Michael Parkhurst and trying to slip a pass past him that was blocked. The ball bounced back to Villa, who continued to move across the penalty box where Nagbe joined Parkhurst in trying to stop him. Villa tried to go deeper into the penalty box where Julian Gressel then became the third player trying to slow down the Spaniard. Villa turned back toward the field and hit a soft pass to Ring, who trailed the play.

With three defenders sucked into Villa’s dribbling wake, no one was there to pressure Ring, who took a touch and then the shot.

“We knew coming into the game he’s got that ability to take a touch and put his foot through it,” Guzan said. “The disappointing thing for us was we did all the hard work with Villa, and ushered him across the top of the box and away from the goal.

“With one pass, we never got pressure on the ball. When you play New York City, with the players they have, you’ve got to pressure the ball. With one swing of the leg, he punished us.”

NAGBE’S DISALLOWED GOAL

RING’S GOAL