$(function(){
$('td:nth-last-of-type(7n-1)').each(function (i) {
$(this).html(i+1);
});
});
table{
counter-reset:test;
}
tr:nth-child(n+3):nth-last-child(n+3) td:nth-child(7n-2):before{
counter-increment:test;
content:counter(test);
}