MV Adding variables in battle

Hello, fellow RPG makers!
I am essentially looking to count how many times that a spell is done.
Code:
\v[182] = $gameVariables(182) + 1; Math.round(a.mat * 2 - b.mdf);
I have tried it with and without the \ character. I feel like I'm missing something simple. Thanks for any help in advance!

Edit: Okay!! So, I figured it out. Using a common event and just calling it, I was able to keep track and even do the skill swapping I wanted.
The correct line to do it in a formula in RMMV or RMMZ would have been:

$gameVariables.setValue(182, $gameVariables.value(182) +1); a.mat * 2 - b.mdf

Regardless, since you've already figured out another way to do it, I'm closing this thread at your own request.

Original thread: https://forums.rpgmakerweb.com/threads/adding-variables-in-battle.134264/