Immediate actions are defined as follows:
Immediate Action: Much like a swift action, an immediate action consumes a very small amount of time, but represents a larger
expenditure of effort and energy than a free action. However, unlike a
swift action, an immediate action can be performed at any time—even if
it’s not your turn. Using an
immediate action on your turn is the same as using a swift action, and
counts as your swift action for that turn. You cannot use another
immediate action or a swift action until after your next turn if you
have used an immediate action when it is not currently your turn. You
also cannot use an immediate action if you are currently flat-footed.
Immediate Actions start in the order they are announced. In your example Wizard A starts casting Apocalypse from the Sky, Wizard B cast Celerity and then combust, then Wizard A casts Celerity and counterspell.
This would then resolve as the counterspell countering the combust, and then the Apocalypse coming.
So in answering your numbered questions:
1) Yes
2) Once Wizard B announces his immediate action it has started and would complete except for the counterspell of Wizard A. Wizard A's counterspell starts a tiny bit later than Wizard B's combust. So no issue there.
3) See 2 above
4) Celerity would cause Wizard A to be dazed (unless he was immune as you have suggested). If not immune I would allow him to complete his Apocalypse spell but I think the RAW answer would be that he could do nothing after the action he gained from the Celerity.
Maybe - it's basically up to DM fiat
You've hit upon a genuinely contentious question. Let's work this one through...
Why you shouldn't allow a second counterspell
Counterspell uses a reaction, and a reaction is:
an instant response to a trigger of some kind (SRD p. 91)
If counterspell has to be cast as an instant response to a trigger then once someone decides not to initially cast Counterspell, they cannot choose to do so later, the instance has passed.
There is no rule suggesting that a failed Counterspell has lengthened the time that it took the opposed caster (Freddy) to cast that spell (due to mental interference or whatever). So the instant trigger, that Tommy needs to respond to, has not been lengthened by the failed attempt to Counterspell (made by Bobby).
Let's look at this another way. The trigger for Counterspell is:
when you see a creature within 60 feet of you casting a spell
So, when Freddy begins casting his spell, provided they can see him, both Bobby and Tommy meet the conditions to cast Counterspell. However, if Bobby chooses to cast it initially and Tommy doesn't, once Bobby's attempted Counterspell has failed, does Tommy still meet the trigger condition in order to now attempt his own Counterspell? Is Freddy still casting a spell or has he, in the elapsed time, already successfully cast it? The rules are unclear. The casting time of most combat spells (1 action, or 1 bonus action) is pretty abstract, but neither of these periods of time is long (arguably significantly less than six seconds, as one character could cast up to three spells in one round of combat, if they used action (cantrip), bonus action and reaction to do so).
It could be argued that the only non-meta sign that Tommy would see, that Bobby's attempted Counterspell had failed, would be Freddy successfully casting his spell, at which point it is obviously too late for him to attempt to counterspell.
Why you should allow a second counterspell
Counterspell reads:
You attempt to interrupt a creature in the process of casting a spell (SRD p. 131)
Combat is an abstraction, so while in-game both counterspells would be rationalised as being resolved simultaneously, they in reality are not resolved that way at the table.
The first attempted Counterspell (Bobby's) will be resolved, at the table, before the casting of the antagonist Freddy's spell has been resolved. As soon as the first Counterpsell has failed Tommy (the second caster) could attempt to cast Counterspell, using his own reaction, in response.
As Rubiksmoose said in his answer:
Only after the spell completes and begins to take effect is the spell no longer a valid target for counterspelling.
Taking this to it's logical conclusion, if Tommy's Counterspell also failed, a third caster could then also attempt to counterspell, and then a fourth, and so on.
This might seem extreme but allowing it is arguably balanced. Each Counterspell attempt consumes a reaction and a spell slot, so the more characters that try to Counterspell the same spell the better it is for their enemy, who has always used only one slot to cast their own spell.
So, how should you rule?
Well, that's entirely up to you. Both approaches seem to have benefits, I'd consider which you think your players will find more fun.
Would you players enjoy the drama when the second caster comes through with an important save, at a crucial moment, after the first attempt at Counterspell had failed? Mechanically this might to be the higher tension and more exciting option.
Or, would your players prefer the jeapoardy of having to decide what their PCs would do in that situation simultaneously, before either counterspell is resolved? They'd run the risk of a wasted spell slot if both succeed. This seems like it could be the more realistic roleplaying decision, and narratively satisfying, and also gives both players a meaningful decision to make.
Best Answer
You can Counterspell a Counterspell, yes. You're allowed to take reactions on your own turn, and casting Counterspell will trigger the reaction for Counterspell. This was confirmed in a Sage Advice column:
There's one important restriction to mention here. If you cast a bonus action spell,
So you can Counterspell the guy trying to Counterspell your Fireball, but you can't Counterspell the guy trying to Counterspell your Expedititous Retreat (for example).