There is no maximum. The engine can handle whatever you give it provided you have the hardware to support it. A game engine is real-time which means that your frame rate isn’t a constant like in film or pre-rendered animations. That said, optimally you want to have the fewest number of keyframes as possible to complete your motions as animation is rather expensive compared to everything else you can render. For example, an idle animation with 100 keys is much better than an idle with 5000. When I animate, I typically assume 30 fps, but you can adjust the play rate of any animation inside the editor to get the desired duration, so really the fewer the frames the better. A typical walk cycle for example is just two steps. There’s no need to do more than that, unless you’re trying to get in a lot of extra detail (like maybe the character has a subtle limp every few steps) but even then, you can layer animations to achieve this without the overhead of a large sequence.
Hope that helps!