title: How to find how many times each value is repeated in generic class list?
body: <p>I am doing my homework about Generic classes, I have created my data classes Student and Module, and List class List, everything is connected with nodes, I have Node class too, but that is not the case. I need to find how many modules each lecturer has(lecturer can have more than 1 module).
  Let's say I have data about module:</p>
  
  <pre><code>Module name   Lecturer name 
  Math            AAAA
  Physics         BBBB
  IT              AAAA
  </code></pre>
  
  <p>So I need to find how many modules each lecturer has, because every lecturer can have more than 1 module, so the results should be:</p>
  
  <pre><code>AAAA - 2, BBBB - 1
  </code></pre>