Views alter changes next row instead of current one
Got it to work with the following code. I needed to output the changed value in the $vars['output']. This would override the url in the nothing_1 field so I then had to create a new link and use that to alter the original value.

/**
 * Implements hook_preprocess_views_view_field().
 */
function frontview_general_preprocess_views_view_field(&amp;$vars) {

  $view = $vars['view'];

  if(isset($vars['view']) &amp;&amp; ($vars['view']-&gt;id() == 'evenementen') &amp;&amp; ($vars['view']-&gt;current_display == 'accreditaties_overzicht')) {

    if($vars['field']-&gt;options['id'] ==='nothing_1') {
      $accreditaties = $vars['row']-&gt;_entity-&gt;get('field_accreditaties');
      $accreditaties = $accreditaties-&gt;getValue('list');
      $amount = count($accreditaties);   

      // $vars['field']-&gt;options['alter']['text'] = 'View Applicants ('. $amount .')';

      $nid_value = $vars['row']-&gt;nid;
      $url = Link::fromTextAndUrl(t('View Applicants ('. $amount .')'), Url::fromRoute('view.evenementen.page_2', ['arg_0' =&gt; $nid_value]))-&gt;toString();

      $vars['output'] = $url;
    }
  }
}