I have an example of an incremental status done with a gameScript here:
MyMod_Statuses.gameScript. It utilizes the same event/function that LarIlya mentioned - FetchCharacterApplyStatusData, though it increments up to a 5th version, and uses what I call a "proxy status" to apply the actual status, which in this case, is MYMOD_PAIN_APPLY. Your skill would apply MYMOD_PAIN_APPLY, and the script would handle applying the actual status, or incrementing it to a higher version if PAIN 1-4 is already active on the target.