How to detect and count user login failed attempts

Hi Auth0 team,

I have a requirement to count user login failed attempts. I understood that we can customize the number of attempts for brute-force attack. However, it is not my point. I need to detect user login failed attempts not in Auth0 dashboard side but in callback side.

Regards