Get when the animation is finished

Hello. I need to get when the animation is finished, so I tried to use the property normalizedTime, but this property says that the animation is finished when it turns to 1, but it actually never turns to 1, just to some number like 0.9943789564 and I cant get a precision to increment a counter. Look:

if (mao.GetCurrentAnimatorStateInfo(0).normalizedTime == 1)

If i try to use something like >= 0.999 it will enter in this condition more than one time, so I’ll lost the precision of the counter. Can someone help me how to increment a counter with precision when the animation is finished?

You need one more condition along with this one
anim.GetCurrentAnimatorStateInfo (0).normalizedTime >= 0.99f && !anim.IsInTransition (0)