– As the shots piled up, so did the games while another number stayed stagnant.

Wild captain Mikko Koivu’s goal output.

“It starts getting frustrating,” he said.

All 65 pucks Koivu put on net since Halloween were futile, a 24-game drought that became magnified recently as scoring woes began to infect the entire forward group.

But Koivu’s re-emergence sure came at an opportune time for the Wild.

Not only did he shrug off his slump, he also seemed to spark his peers — serving up the tying goal and extending a comeback that the Wild completed 6-4 over the Senators on Tuesday in front of 13,804 at Canadian Tire Centre to nix a two-game slide during its second test of a four-game road trip.

“It was huge,” center Eric Staal said. “Everyone’s been there when you’re pressing. ... That was a huge goal.”

The Wild scored five straight goals, climbing out of a 3-1 hole before defenseman Jonas Brodin secured the eventual game-winner 4 minutes, 57 seconds into the third period.

A six-goal outburst from a season-high 40 shots tied the team’s best offensive showing this season, a much-needed performance that held up amid a 28-save performance by goalie Alex Stalock.

“It says a lot about this group the way they come back,” Stalock said.

The Wild was in catch-up mode from almost the get-go; only 2:08 after puck drop, Senators captain Erik Karlsson sent a puck through traffic and behind Stalock. That Ottawa lead, though, didn’t make it out of the period, as Staal tipped in a Ryan Suter shot at 11:11 — the first goal by a forward in three games.

Another fast start by the Senators in the second period put them up 2-1. And, again, Karlsson was the architect — this goal a one-timer on the power play 1:08 into the second.

Jean-Gabriel Pageau grew that advantage at 5:44 when he skated to the front of the net unguarded to redirect a behind-the-net feed from Tom Pyatt.

After that, the Wild took over.

The quality of its chances improved dramatically, as the puck seemed to roll everywhere but over the goal line — that is, until Chris Stewart’s redirect in front eluded goalie Craig Anderson at 10:19.

Later in the period, Stalock made two clutch saves shorthanded, stopping Nate Thompson before turning aside the attempt off the rebound from Pyatt.

“It was a game-saver,” Wild coach Bruce Boudreau said.

That helped pave the way for Koivu’s equalizer with 55 seconds left — his first goal in 25 games and fifth this season.

“All you can do is try to create and find a way to get out of it, try to do the things right that are working and not get away from that, not start cheating and just thinking about the offense,” Koivu said. “So, yeah, obviously it felt good.”

Koivu hadn’t scored since Oct. 28 in a 2-1 win over the Penguins, the game-winner, and this one was significant, too. It seemed to galvanize the Wild, as the team pulled away in the third.

Only 1:48 into the period, defenseman Nate Prosser capitalized on a point shot for his first goal of the season and Brodin pounced on a loose puck near the side of the net at 4:57 to make it 5-3.

The Senators challenged on the grounds of goaltender interference, but the goal stood.

“We want to be headed in the right direction,” Staal said. “Great opportunity the rest of this trip to hopefully finish strong.”