At the height of the Cold War, the USA and the USSR each had around 10,000 warheads ready to go. That's more than enough to turn the other side to slag with plenty left over for anyone else. Way more than enough. We are talking "kill the whole world several times over" arsenal levels.
I believe the justification for this was to be sure of having Second Strike capability - even if the other guy got in a sneak first attack and took out 90% of your nukes, you'd still have enough to hit back with.
As for "all the nations join together and..." scenarios? "Well, comrade, that is why we nuke them out of existence first, so they cannot do that!"
And another thing to understand: in a total war with nuclear weapons scenario, each side will try to preemptively take out the other side's nuclear missiles before they can be launched. Which means that if you have such missiles, it's "use it or lose it". Either pick a target and send them on their way, or see them destroyed where they are.
So you don't waste nukes by using them - you waste them by not using them!
Which means that nuclear-armed nations having their warheads and delivery systems on survivable platforms - eg boomer submarines that can hide out in the ocean - will in effect make a war that escalates to use of nukes actually be less all-out crazy.