Add a lookup column pointing to the same table → row ids.
Create a “Find element index” column. Select the lookup column as the “values” and select the current row id as the “To find”. Set precision to “1” and uncheck group separator.
You will see the index of the element across the entire table. It will be incremented on each line.