Danny Rowe scored late on against Southend to hand Stockport only their eighth win of the season.
Greg Tansey put the home side ahead from the penalty spot, after Sean Clohessy had fouled Rowe in the area.
Harry Crawford set up Kyle Asante, who fired in to pull the visitors level with just 10 minutes left.
Rowe found the winner in stoppage time when he got on the end of Anthony Elding's flick-on and handed County all three points.
Stockport County manager Ray Mathias told BBC Radio Manchester:
"It's the first time I've gone in and slaughtered a team that's won 2-1, as we can't afford to let teams in that late in the game.
"I've seen him (Danny Rowe) play in the reserves and it made my mind up about putting him in and he's gone out there and produced the goods.
"We've passed the ball superbly at times and overall I was really pleased with them."
Southend United manager Paul Sturrock told BBC Essex:
"Well after 45 minutes, it didn't look like we had any chance in this game.
"I just can't put my finger on why we started this game so badly.
"The whole 45 minutes of the first half was probably our worst performance of the season."