Table.maxn
From OpenEUO
table.maxn (table)
Returns the largest positive numerical index of the given table, or zero if the table has no positive numerical indices. (To do its job this function does a (potentially computationally expensive) linear traversal of the whole table.)