Former Newcastle striker Ranger opened the scoring after only 11 minutes by climbing to head home an Alex Pritchard corner.
N'Guessan doubled the home side's lead from the penalty spot 17 minutes later after Nathan Byrne was bundled over by Mustapha Dumbuya.
County striker Danny Haynes thought he had reduced the deficit 13 minutes before half-time but his effort was ruled out for offside.
Swindon were denied a third goal early in the second half when Byrne fired against a post after following up Pritchard's free-kick.
Haynes could have set up a nervy finish for Mark Cooper's men but blazed a late penalty over the crossbar following Yaser Kasim's foul on Callum McGregor.
The win would have been more emphatic but for a string of impressive saves from County's former Southampton goalkeeper Bartosz Bialkowski.