Here is the context from Foundation:There were nearly twenty-five million inhabited planets in the Galaxy then, and not one but owed allegiance to the Empire whose seat was on Trantor. I don't know what not one but...means here.
I think this is quite a difficult idiom because it's not used much any more. Here are some other examples from English literature, to familiarize you with it, TaiChiChuan.
One by one he subdued his father's trees
By riding them down over and over again
Until he took the stiffness out of them,
And not one but hung limp, not one was left - There was not one which didn't hang limp. For him to conquer.
Robert Frost, Birches. Their formidable number and the formidable guard that accompanied them, had prevented any molestation from the banditti; but every carriage had its tale of wonder, and one vied with another in the recital. Not one but had seen(ie. there was no one who had not seen) groups of robbers peering over the rocks; or their guns peeping out from among the bushes, or had been reconnoitred by some suspicious-looking fellow with scowling eye, who disappeared on seeing the guard.
Washington Irving » Tales of a Traveller » The Inn at Terracina