Getting number of executed jobs for an activity?

Hello,

I have integrated Camunda into my Spring Boot project and I am using Java Delegates.
I would like get the number of executions of the current job for the single activity in one of those delegates. I need it to determine my retry behavior because I have some special conditions.
Is this possible?

Cheers
Kevin