title: Counting number of occurrences on the whole Pandas DataFrame
body: <p>My dataset has this structure</p>
  
  <pre><code>A = [A1, A2, A3, A4]
  B = [B1, B2, B3]
  C = [C1, C2, C3, C4, C5]
  </code></pre>
  
  <p>I want to count the occurrences of all variables in my dataset, such as:</p>
  
  <pre><code>A1    3
  A2    2
  A3    1
  ...
  C4    4
  C5    5
  </code></pre>
  
  <p>I have tried</p>
  
  <pre><code>df.groupby(df.columns[0]).A.count()
  </code></pre>
  
  <p>but it only works column by column, is there any way to count occurrences for the whole dataset at once?
  Thank you.</p>