[LUA] AnimationState trackCount fix

As is the addAnimation function does not update the trackCount when adding an animation to a previously empty track. This fix updates the trackCount when adding an animation to an empty track, which I assume is the wanted behavior.