Re-Incrementing all counters in table

Re-Incrementing all counters in table

I previously had a question about incrementing a counter column in a table as rows are added:
http://forum.jquery.com/topic/incrementing-numeric-content-of-td-cell-after-adding-row-to-table

The relevant part is this:

  1. newRow.find('td:eq(1)').text($('#mytable tr').length - 1);
However, since I created a delrow function to remove rows, I see that the counter is not being re-incremented. So if I remove row 2, the counter column will display 1, 3. Is there a way to have the counters re-incremented after I run the delrow function? I'm guessing I need to do something like loop through each line and run a similar find command but do -2 instead? Is that the right path, or is there a better way to do this? Thanks.