When a country pulls out, they are done. Unless you're insanely lucky, you're going to lose a country, probably within the first two months, as you just aren't progressed far enough to have the ability to defend everyone.
Rule 1. I am always right. Rule 2. If in any case I appear wrong, refer to rule 1.
Its not too hard to keep everyone in. Get satellite coverage up ASAP on any countries on panic level 3 or 4. There is a bit of luck involved because you have to rely on not getting two missions in a row that force you to chose between two panicking countries. In the early going, its more important to choose missions that reduce panic rather than taking the resource reward you want. The council missions also help.
On my third month in, I've only lost Russia so far. The remainder are split in two: really calm or close to pulling support. I'm probably going to lose one or two more soon enough, but I should be able to defend more in the near future.
"We are all legends...our only choice is how to end the tale."
I wouldn't say it's impossible to keep all the countries but so far I haven't been able to get satellites up quick enough to keep them all. I lost Australia and Japan in the 3rd month and then just said to hell with Asia since I won't get the bonus anymore and concentrated on the rest of the Globe. By the time I got satellites up for all of North and South America and Africa I was working my way to covering Europe when the rest of Asia left as well. Didn't bother me much since they weren't helping as far as funding or anything went anyways.
If you have satellite-covered 4+ (3+ classic/impossible) panic countries across multiple continents that have at least one country *not* covered, and at least three total countries aren't covered, you need to prioritize finishing sat coverage on those continents (in your priority order) ASAP. This is one potential exception to the "use satellites at the end of the month" rule, because by then it might be too late.
Alternatively, tactical use of story mission panic reductions can save you, as can random council missions and exceptional performance on terror attacks. These require a bit of luck, though.