Hi Nicky,
Try this?
<a href="#" data-courseid="${s.result.metaData["A"]!?replace("|", ", ")}_${s.result.rank!}">
Otherwise your original code wasn't too far off, but instead of just assigning a new value to the count
, you'd also need to print the value where you want it:
<#assign count = count + 1>
<a href="#" data-courseid="${s.result.metaData["A"]!?replace("|", ", ")}_${count!}">