Forum:Exhausting Spell vs Mega Ton Magical Cannon

Ok, there are two players, Player A and Player B. Lets say player A has 10 spell counters on their side of the field. Player A activates Mega Ton Magical Cannon and in response, Player B activates Exhausting Spell. Is the cost for MTMC (10 Spell Counters) paid BEFORE Exhausting Spell's effect of removing all Spell Counters takes place? Then, would MTMC still clear the opponent's field?