How can I get the count of Verify Activity failed?

We have an automation framework in place. I need to get the Verify assertions count !=0 , based on which I can update the final result as pass or fail.

image

How can I save this count in variable or arguments?