title: Unique values with frequency count from List<List<String>>
body: <p>I am trying to count the number of occurrences of every element in a <code>List&lt;List&lt;String&gt;&gt;</code>, and store the results in a <code>Map&lt;String,Long&gt;</code>.</p>
  
  <pre><code>Map&lt;String, Long&gt; map = new HashMap&lt;&gt;();    
  for(List&lt;String&gt; l : data) {
          for(int i = 0; i &lt; l.size(); i++) {
              String myString = l.get(i);
              long count = data.stream().filter(d -&gt; myString.equals(d)).count();
              map.put(myString, count);
          }
      }
  </code></pre>
  
  <p>My code returns zero as value for every key. Is there a way to fix it? Thank you.</p>