title: getting count in pandas python
body: <p>I have a dataframe like the following:</p>
  
  <pre><code>boss_id    employee_id      designation        
   -1           100              CEO
  100           39               Manager 
  100          4567              Manager
  100          9843              Manager
  39            47               entry level
  39            45               entry level
  4567          8                entry level
  9843          9                entry level 
  </code></pre>
  
  <p>In this boss_id gives the boss of the employee. Designation is for the employee. 
  I want to find how many people each person manages in total. </p>
  
  <p>For instance, since CEO is the ultimate person, he should be managing all 7 people in this dataframe. Managers manage just the entry level. For instance, employee 39 who is a manager manages 2 people in this dataframe. Finally, the entry levels don't manage anyone, so their count should be 0.</p>
  
  <p>I want a dataframe like this:</p>
  
  <pre><code>boss_id    employee_id      designation              count
   -1           100              CEO                     7
  100           39               Manager                 2
  100          4567              Manager                 1
  100          9843              Manager                 1
  39            47               entry level             0
  39            45               entry level             0
  4567          8                entry level             0
  9843          9                entry level             0
  </code></pre>
  
  <p>I can't get my head around this and any help would be much appreciated! Thanks in advance.  </p>