OTP Attempt Count

Hi Folks,

Is there a way to count invalid OTP attempts and display this information in the login page. And possibly block user after certain tries.

Thanks