title: Calculate count of all the elements in nested list
body: <p>I have list of lists and would like to create data frame with count of all unique elements. Here is my test data:</p>
  
  <pre><code>test = [["P1", "P1", "P1", "P2", "P2", "P1", "P1", "P3"],
          ["P1", "P1", "P1"],
          ["P1", "P1", "P1", "P2"],
          ["P4"],
          ["P1", "P4", "P2"],
          ["P1", "P1", "P1"]]
  </code></pre>
  
  <p>I can do something like this using <code>Counter</code> with <code>for</code> loop as:</p>
  
  <pre><code>from collections import Counter
  for item in test:
       print(Counter(item))
  </code></pre>
  
  <p>But how can I have result of this loop summed up into new data frame ?</p>
  
  <p>Expected output as data frame:</p>
  
  <pre><code>P1 P2 P3 P4
  15 4  1  2
  </code></pre>