Forum:Adding row numbers to table?

Has anyone implemented a way to add static row numbers to a sortable table, so that the rows are numbered sequentially regardless of the way the table is sorted?

Something like this approach on Wikipedia.
 * You can import the enwiki* pages to your wiki by copypasting the content of this and this. Cigaryno (talk) 17:00, 9 September 2022 (UTC)