title: Count factors after a specific factor
body: <p>I have a dataset including activities a, b, and c as follows;</p>
  
  <pre><code>User-ID    Date            Activity       Number of activity
  1       03.04.2014         a              3
  1       04.04.2014         c              2
  2       05.06.2014         a              3
  1       12.06.2014         b              2
  1       06.10.2014         b              1
  3       10.11.2014         a              3
  1       05.11.2014         c              2
  1       06.12.2014         a              1
  2       06.12.2014         b              3
  2       07.12.2014         a              4
  2       07.12.2014         c              2
  2       08.12.2014         a              1
  3       08.12.2014         b              3
  </code></pre>
  
  <p>I would like to write a code which displays the sum of activities <code>a</code> and <code>c</code> for each user since the last activity <code>b</code>. For example; User-ID: 1 has activities "a" and "c"; in total 3 times after activity <code>b</code>. 
  How can count the number of activities after a specified factor? (in here: since the last "b")</p>
  
  <p>The expected result: 
  User ID: 1   Total activity: 3
  User ID: 2   Total activity: 7
  User ID: 3   Total activity: 0</p>