Immolating Gyre deals X damage to each creature and planeswalker you don't control, where X is the number of instant and sorcery cards in your graveyard.
Because Immolating Gyre is still on the stack while it’s resolving, it doesn’t count towards the value of X.
In a Two-Headed Giant game, Immolating Gyre deals damage to your teammate’s creatures and planeswalkers.