How to detect maximum number of executable statements per deluge action

How to detect maximum number of executable statements per deluge action

How do I detect if one of my users has reached the maximum number of deluge statements limit so I can have them contact me so I can manually update ranges of records for them?

What's the best way to notify the user and log the event?

Is there a way to test a function prior to execution to determine the number of deluge statements it will consume?

If I call a function that has 2 statements, would that count as 3 statements?

This is the case I am trying to solve for:
I have an application that groups records into categories and subcategories. I create a back link using a rich text field in each record so users know where they are in the hierarchy and so they can get back. It looks like this: Category -> sub-category -> sub-sub-category. If a user changes the category of an item, all the sub-items need to have their back links updated. Since I don't control how many records users add, I can't control how many deluge statements are needed to complete the update. 

Thanks