I've created an automation to count the number of tasks in an Epic every time a task is added to or removed from the Epic, as configured below.

However, this automation rule is not functioning correctly with the audit log, as detailed below.

I hope to receive assistance from the community!