Output loop position number
You can use Twig's loop variable (docs).
{% for asset in relatedEntries %}
&lt;div id=&quot;locate&quot; class=&quot;locate&quot;&gt;  
  &lt;div class=&quot;portname&quot;&gt;
    &lt;a href=&quot;/memory/index.php/bio/{entry_id}&quot;&gt;{{ loop.index }}  {{ asset.title }}&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt; 
{% endfor %}