how to count which frame in running in an animation

how to count which frame in running in an animation

Animations in Unity don't playback one frame at a time, but rather are played back continuously. See this description in the manual: Animation Playback and Sampling

Thus, time is measured in "time" (in seconds) and not in frames.

In order to see the current time of an AnimationState, just query the time property of that state. For example, to see the current time of an animation called "Run" you can use this:

var currentTimeInRunAnimation = animation["Run"].time;