title: Count values for each row with a unique ID
body: <p>I have a bunch of rows in a table. Each row reflects an event in a patient. However, one patient can have experienced multiple events, so it's possible for there to be multiple rows with the same patient number. Now I'd like to count the amount of male patients in my database, without counting the ones that had multiple events multiple times. Each patient is identified by a unique patient ID that could be used for this.</p>
  
  <p>This shouldn't be all that complicated if not for the fact that I'm using a table that also has several filters, so I need to use <code>SUBTOTAL</code> for any counting functions.</p>
  
  <p>I literally have no idea where to start, so I can't really provide any code...
  Any function that could point me in the right direction would be greatly appreciated.</p>
  
  <p>Thanks for the help.</p>
  
  <p>~Laurens</p>