How to increment variable in Twig file?
As you mentioned, there's no loop, so you can't do this in the template file (well you could, but it wouldn't be worth the effort).

Instead, you could maintain a static variable in a preprocess function:

function MYTHEME_preprocess_views_view_fields__view_machine_name(&amp;$vars) {
  static $counter = 0;
  $vars['counter'] = $counter++;
}


And refer to it in the template as normal:

&lt;div class="profile-pic pic{{ counter }}"&gt;{{ fields.field_picture.content }}&lt;/div&gt;


You might need to tweak that, for example if the View is rendered twice on the same page.