There is no limit, at least not by definition. And more so, not something across all terminals ever made.
Most prominent nowadays (*1) is the so-called ANSI sequences standard - understood by next to all terminals built after ~1978. Trying to be as device agnostic as possible, it implies no upper limits by itself. The structure is built (*2) around an initiating sequence (
[; *3), one (or more, separated by
;) value(s) expressed in ASCII numerals, and a command letter.
<ESC>[<Value>A moves the cursor <Value> lines up.
<ESC>[<Value1>;<Value2>H moves the cursor to line <Value1> and column <Value2>, counted from the top left position (as 0;0).
There is no definition how many valid digits a value may have, or what's their upper limit. While the standard defines a default value of Zero for a left out parameter, it doesn't always apply, as these examples conveniently display. Where Cursor-Up assumes 1 as default, if no value is given, Cursor-Positioning assumes 0;0 as default (*4). Similarly, upper limits are defined by each command and terminal depending on their capabilities (and how intelligent or lazy the programming was done).
*1 - Well, since the late 70s at least that is.
*2 - And based around the command sequences defined for the popular DEC VT-52 of 1975.
*3 - Or CSI (Control Sequence Indicator), X'9B' - that's ESC set with high bit set. A trick to reduce overhead after 8 bit lines became standard. Not that it meant a lot with the verbose encoding anyway.
*4 - It is simply a left over from ANSI-encoding being an extension of the VT52 command set - here
A moved the cursor up one line, so for compatibility it had to do the same in the later standard.