Query condition on entity reference field count
Try to use the delta. This is explained here: QueryInterface: 

$query = Drupal::entityQuery('node')
            -&gt;condition('type', 'article')
            -&gt;condition('field_tags.%delta', 1, '&gt;');
dd($query-&gt;execute());