okay - seems that was an old version where I had some issues with the order of things. Can you please download and try again?
This is a method in the battler class, so you can use any commands for a battler (ie - leave out the b. - it just works on the target by default).
The correct command to add to the state is:
onadd: $game_variables[61] += 1 if actor? && id == 5
However, in testing, I noticed a weird situation occurs - when the actor is first set up, their HP starts at 0 before it's initialized to the correct value. And the test to "apply the death state if HP is 0" gets run. So as soon as you start a new game, the death state is applied, the onadd script is run and the variable is incremented.
To get around this, you just need to set the variable to 0 at the start of the game (or at the time you add the actor to your party and initialize them).
Seems to work after that.