If we use the actual line numbers and anyone ever deletes a line, we’re going to have gaps in the line numbers, which would likely be more confusing than useful. I would suggest just assigning a number in our code and increasing it each loop.
<#if record.item?has_content>
<#assign linenum=1>
<table class="itemtable" style="width: 100%;"><!-- start items -->
<#list record.item as item>
<#if item_index==0>
<thead>
<tr><th align="center" colspan="2">Line</th>
<th align="center" colspan="3">Quantity</th>
<th colspan="12">Item</th><th align="center" colspan="4">Unit</th>
<th align="right" colspan="4">Receipt Date</th>
<th align="right" colspan="4">Rate</th>
<th align="right" colspan="4">Amount</th>
</tr>
</thead>
</#if><tr>
<td align="center" colspan="2" line-height="150%">${linenum}</td>
<td align="center" colspan="3" line-height="150%">${item.quantity}</td>
<td colspan="12"><span class="itemname">${item.item}</span><br />${item.description}</td><td align="center" colspan="4">${item.unitsdisplay}</td>
<td align="right" colspan="4">${item.expectedreceiptdate}</td>
<td align="right" colspan="4">${item.rate}</td>
<td align="right" colspan="4">${item.amount}</td>
<#assign linenum=linenum + 1>
</tr>
</#list><!-- end items --></table>
</#if>