You cast the 2nd counterspell before the 1st counterspell's ability check
Counterspell (PHB, 228) is clear in it's mechanics (my emphasis):
You attempt to interrupt a creature in the process of casting a spell.
When using this spell, you are interrupting the casting. No effects are being resolved prior to the counterspell.
In your question, no ability check is made on the first counterspell because it is currently being counterspelled. If for some reason that second counterspell fails, then the ability would check on the first would complete.
This means the following is happening in order:
- Creature A begins to cast disintegrate
- Creature B sees the spell being cast and casts counterspell. Let's say that they are casting it at 3rd level, so there would have to be an ability check to determine if it's effective. But wait!
- Before Creature B's spell is resolved, creature A casts counterspell to stop it. In the case above, Creature B was using a 3rd level slot, so the 3rd level slot spent by Creature A to counter it would be enough to stop it.
- Disintegrate now finishes and target makes saving throw.
The key here is that counterspell is interrupting the casting of a spell. In the first counterspell casting, it's interrupting disintegrate. In the second (the attempt to stop the first counterspell), it's interrupting the counterspell against your disintegrate.
To be clear: When you attempt to counterspell the counterspell, you are stopping it from completing. There is no ability check for the first counterspell against disintegrate because you are interrupting the casting.