title: Laravel Collections - compare and check how many times a word exits in a collection
body: <p>i am new to Laravel and i am trying to do the following:
  i have 2 Collections: &quot;requirements&quot; and &quot;skills&quot;:</p>
  <pre><code>$req = collect([
      'Installation',
      'Konfiguration',
      'Automatisierung' 
  ]);
  
  $skills = collect([
      'Engineering Team',
      'Installation',
      'Konfiguration',
      'Konfiguration',
      'Automatisierung',
      'Security',
      'Automatisierung',
      'Automatisierung',
      'Automatisierung'
  ]);
  </code></pre>
  <p>I am trying the following: I want to take the first item of $req (&quot;Installation&quot;) and count how many times it  exists in the  $skills collection. Then i need to take the second value of the $req collection and do the same thing. At the end i need to have some output like:</p>
  <p>Installation exits 2 times
  Konfiguration exists 2 times
  Automatisierung exists 3 times
  all others -&gt; 0 (or even ignoring it)</p>
  <p>i thought about iterating with nested for loops and if clauses and so on like &quot;classic&quot; coding, but isnt there something in laravel to make it nicer? I tried like contains and so on but its like &quot;if&quot; clause.</p>
  <p>Thanks a lot in advance</p>