It technically doesn't have "frames".
But if you want to determine "framecount" in terms of Spine editor's timeline's 30fps key snapping, you can do that.
An Animation's duration is stored as seconds as a float.
So you get the animation's duration and divide by 30.
framecount = duration / 30
Since it's a float, I'm not sure how reliable the / 30
operation will be in terms of giving you whole number frames. But you could just round that number with a separate function, I guess.