Damian Spencer headed a 93rd-minute winner as Aldershot picked up a 1-0 victory and cruelly denied 10-man Stockport a crucial point.
The substitute was introduced in the final 10 minutes after County's Alan Goodall had seen red for a second bookable offence and popped up in the dying seconds to snatch the points.
County were first to threaten when Everton loanee James Wallace fired his eighth-minute free-kick against the wall.
In the 27th minute Adam Griffin's inswinging cross found Anthony Elding but the journeyman striker was ruled offside as he fired at goal.
The Shots finally threatened a minute before the break when Ben Harding found Danny Hylton in the box but his shot was kept out by Jordan Rose.
Five minutes after the restart Wallace's 25-yard curler went just wide as County continued to threaten.
Jermaine McGlashan then sent Tim Sills in but the targetman lost his footing in the box and Danny Hylton fired straight at Ian McLoughlin.
But two minutes later County were up against it when Shots substitute Adam Mekki was clattered by Goodall, who was sent off for his second yellow card.
It was all Aldershot from that moment with Mekki's strong 75th minute run ending with a cross to Peter Vincenti who fired straight at defender Rose.
And the Shots won it when Alex Rodman's cross found Spencer at the back post and he headed past McLoughlin from four yards.
Copyright (c) PA Sport 2009, All Rights Reserved.
Do YOU want to write for GiveMeSport? Get started today by signing-up and submitting an article HERE: https://www.givemesport.com/writeforgms