I'm trying to display count within the 'dt' wrap of each person but at the moment its displaying count between everyone in and outside the 'dt' wrap. I've attached a screen print. if anyone can advice me on this fix I'd greatly appreciate it.
$('.order_table_item .variation dt').each(function () {
if ($(this).text() == 'Candidate Name:') {
$(this).next().show();
$(this).before("<div class='count'></div>");
$(this).next().after("<div class='clear'></div>");
} else {
$(this).hide();
}
});
$('.variation .count').each(function(i) {
$(this).append((i+1));
});

I tried,
$('.order_table_item').each(function(i,e){
$('.variation .count').each(function(i) {
$(this).append((i+1));
});
});
and now its doubling up the numbers,

The cleaned up shorted down version of my html,
<table class="shop_table order_details">
<tbody>
<tr class="order_table_item">
<td class="product-name">
<dl class="variation">
<div class="count" style="border-top: 0px none;">11</div>
<dd style="display: block; border-top: 0px none;">Dave</dd>
<div class="clear"></div>
</dl>
</td>
</tr>
<tr class="order_table_item">
<td class="product-name">
<dl class="variation">
<div class="count">22</div>
<dd style="display: block;">JACK</dd>
<div class="clear"></div>
<div class="count">33</div>
<dd style="display: block;">JOHN</dd>
</dl>
</td>
</tr>
</tbody>
</table>