"…the length is the maximum length allowed in the spreadsheet (or 30,000 whichever is shorter)."
The maximum number of rows in a Numbers Table, rounded to the largest multiple of 1000, is 65000, so "30,000" is shorter in all cases. A spreadsheet (which in Numbers is a shortened way of saying "Spreadsheet Document" may contain many tables.
Note that the 'maximum' is an absolute max. The Practical maximum is somewhat less, and depends on the width of the table (Max: 255 columns), how many active formulas you have, which functions are active in these formulas, and how much slowdown you are comfortable with.
Unless you have a need for these 'row numbers' beyond being able to see them, a formula to calculate them is a waste of processor time and energy.
Clicking on any cell in a Table automatically displays the Row and Column reference tabs. Each of the Column tabs displays the column letter(s) for its column. Each of the Row tabs displays the row number for its Row.
If you only need to know how many rows there are in your table, a single formula will tell you that: =Rows(B) counts the rows in column B, and returns the count.
Regards,
Barry