is there a way to record the number of skill used?

basically i in my mind i am trying to set up a battle that when a player use x skill 5 time, the battle will go into a short cut scene, like boss' shield breaks down, and start taking damage onward.
but i am not sure how to begin, i thought it's sometihng like when a player cast x skill, varible +1, then when varible is > than 5, then in troop page, i can put in condition and start editing comment events, but thing is, i am not sure where or how to do "when a player cast x skill, varible +1", any soluton? thx!
Put a common event in the Effects of the skill. In the common event, add 1 to the variable.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-record-the-number-of-skill-used.167666/