title: Count occurrences of items in Series in each row of a DataFrame
body: <p>I have a <code>pandas.DataFrame</code> that looks like this.</p>
  
  <pre><code>COL1    COL2    COL3
  C1      None    None
  C1      C2      None
  C1      C1      None
  C1      C2      C3
  </code></pre>
  
  <p>For each row in this dataframe I would like to count the occurrences of each of C1, C2, C3 and append this information as columns to this dataframe. For instance, the first row has 1 C1, 0 C2 and 0 C3. The final data frame should look like this</p>
  
  <pre><code>COL1    COL2    COL3    C1  C2  C3
  C1      None    None    1   0   0
  C1      C2      None    1   1   0
  C1      C1      None    2   0   0
  C1      C2      C3      1   1   1
  </code></pre>
  
  <p>So, I have created a Series with C1, C2 and C3 as the values - one way top count this is to loop over the rows and columns of the DataFrame and then over this Series and increment the counter if it matches. But is there an <code>apply</code> approach that can achieve this in a compact fashion?</p>