In this case Walking Ballista resolves under player B's control with counters. That's because the mana has been already spent. Aethersnatch just gives the control of the spell to the opponent. On the stack the spell "remembers" how much mana was spent to cast it, and if opponent takes control of it, that doesn't change this fact.
From the comprehensive rules:
107.3a
If a spell or activated ability has a mana cost, alternative cost, additional cost, and/or activation cost with an {X}, [-X], or X in it, and the value of X isn’t defined by the text of that spell or ability, the controller of that spell or ability chooses and announces the value of X as part of casting the spell or activating the ability. (See rule 601, “Casting Spells.”) While a spell is on the stack, any X in its mana cost or in any alternative cost or additional cost it has equals the announced value. While an activated ability is on the stack, any X in its activation cost equals the announced value