title: (Pandas) creating a column that counts the number of times a value in DFa occurs in DFb
body: <p>I have two dataframes, one consists of people and scores, the other consists of each time one of the people did a thing.</p>
  <pre><code>df_people = pd.DataFrame(
      {
      'Name' : ['Angie', 'John', 'Joanne', 'Shivangi'],
      'ID' : ['0021', '0022', '0023', '0024'],
      'Code' : ['BHU', 'JNU', 'DU', 'BHU'],
      }
  )
  
  df_actions = pd.DataFrame(
      {
      'ID' : ['0023', '0021', '0022', '0021'],
      'Act' : ['Enter', 'Enter', 'Enter', 'Leave'],
      }
  )
  </code></pre>
  <p>I would like to create a column in <code>df_people</code> that represents the count of each time they appear in <code>df_actions</code> based on the shared <code>'ID'</code> column.</p>
  <p>it would look like</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: right;"></th>
  <th style="text-align: left;">Name</th>
  <th style="text-align: right;">ID</th>
  <th style="text-align: left;">Code</th>
  <th style="text-align: left;">Count</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: right;">0</td>
  <td style="text-align: left;">Angie</td>
  <td style="text-align: right;">0023</td>
  <td style="text-align: left;">BHU</td>
  <td style="text-align: left;">1</td>
  </tr>
  <tr>
  <td style="text-align: right;">1</td>
  <td style="text-align: left;">John</td>
  <td style="text-align: right;">0021</td>
  <td style="text-align: left;">JNU</td>
  <td style="text-align: left;">2</td>
  </tr>
  <tr>
  <td style="text-align: right;">2</td>
  <td style="text-align: left;">Joanne</td>
  <td style="text-align: right;">0022</td>
  <td style="text-align: left;">DU</td>
  <td style="text-align: left;">1</td>
  </tr>
  <tr>
  <td style="text-align: right;">3</td>
  <td style="text-align: left;">Shivan</td>
  <td style="text-align: right;">0024</td>
  <td style="text-align: left;">BHU</td>
  <td style="text-align: left;">0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I have tried just taking a value count and insterting that as a new column into <code>df_people</code> but it seems very clunky.</p>
  <p>Any advice would be much appreciated.</p>