Yes I opened the Keyboard Maestro dictionary in Script Debugger and set to tinkering… but I think we’re at about the same level of AppleScript competency
I figured out how to identify the macro I’m editing, list its actions, and was working on identifying & counting just the selected actions (to search for Enable/Disable X Actions menu item) when I saw your solution.