George Donnelly shocked Paul Ince’s men with an 11th-minute opener, but goals from Jermaine Easter, Aaron Wilbraham and Andros Townsend kept the Dons’ play-off push firmly on track.
Stockport went in front when on-loan striker Donnelly looped a shot over Willy Gueret from 20 yards for a goal on his first Football League start.
Donnelly then missed a great chance to double his tally nine minutes later. He was tripped in the Dons box by David McCracken, but then saw his spot-kick superbly tipped onto the crossbar and away by Gueret.
The Dons equalised in the 23rd minute, with Easter slamming in his 17th goal of the season from close range after seeing an initial header blocked on the line by County keeper Owain fon Williams.
Wilbraham – another former Stockport striker – put the Dons in front in the 55th minute when he curled a 20-yard drive beyond the outstretched Williams. And 15 minutes from time it was 3-1 as Townsend netted from an angle after latching onto Easter’s neat flick.