How to implement following requirement: Execute one operation when some system internal keywords execute in test case?

Is there a method execute one operation when some step execute in test case.
For example, when some keywords (Verify Element Text, Verify Element Attribute Value) execute, one global variable value plus 1.

I don’t think there is something like that. But you could probably make a custom one yourself.

Have a look at the following:

My trick shows you how to modify the behavior of Katalon builtin keywords on the fly.

For example, when my test case called WebUI.setText(TestObject, String) keyword, not only the text is set into the element but the element is highlighted. See the following demonstration video: