AXL SE CNT1 - Function module - 1088131. Error when counting reverse once value reset to 0

Hi There,
I have an issue with the mentioned function module where I have to reset the counter value to 0. After the reset if the encoder reverses the function block then goes into a fault state as the value goes to what I assume is the maximum for the variable type. Is there a way to prevent the function from going into said fault state? I was thinking of somehow preventing this value from going over lets say 10000000 but am unsure how to approach the issue.
Any and all help will be appreciated.
Screenshot 2025-04-22 175357.png