Add to variable upon learning a skill

Hello, i'm making a class system where you learn skills from equipment (I'm using Moogle_X equipment learning script for that) so when you learn n number of skills from n type of weapon you can change class, i figured the first and last part, to create a variable that tracks how many skills you have learned, but i have no idea how to make it so whenever you learn a new skill from the weapon you add to this variable. Any scripts or plug ins you know that can pull this off?
Moved to: Plugin Support

Original thread: https://forums.rpgmakerweb.com/threads/add-to-variable-upon-learning-a-skill.111459/