Stockport's new keeper Ola Tidman saved their bacon with a remarkable diving save deep into stoppage time.
For an hour County had been down to ten men after Aaron Lescott's red card Anxious for points to get their promotion bid back on track City had built an impressive total of shot and corners when their substitute Simon Clist shot through a crowd of players.
Tidman saw it late but flung himself to his left to stop the ball with his outstretched hand.
The 23-year old Swede, who received international clearance only hours before the kick-off, built on a earlier heart stopper when his skipper Dave Challinor mishit a backpass.
Craig Fagan, a young striker on loan form Birmingham City, was left clear but Tidman saw the shot coming and smothered it well.
It gave his confidence just the boost he needed and it helped his defence to have an immediate respect for the man who has come in to replace the injured Lee Jones.
Without a league win since a 4-1 victory at Stockport on Boxing Day, City were looking very sloppy in defence.
It cost them a goal in the 22nd minute when Luke Beckett sent a downward header past Steve Phillips for his 23rd goal of this season.
City reacted by sending on Brian Tinnion to run the midfield but the turning point came with Lescott's dismissal in the 30th minute. He was booked twice in two minutes, first for dissent and then for shirt tugging.
Stockport re-organised leaving Beckett alone as a front man and set about keeping out a home side whose confidence built with each raid.
Challinor marshalled his defence well as the corner count and shots on goal mounted.
City manager Danny Wilson agreed his side could have gone two or three down before he sent on Tinnion.
Meanwhile Stockport's manager Carlton Palmer had turned to former Chelsea manager John Hollins who was siting beside him for advice.
Finally he sent on Aaron Wilbraham to give some support to Beckett but all the pressure in the end was on Stockport and newcomer Tidman.