title: Hibernate criteria for finding count for distinct value
body: <p>I have the following sql query ,i need to get the corresponding hibernate criteria query</p>
  
  <pre><code>SELECT COUNT(DISTINCT employee_id) FROM erp_hr_payment WHERE payment_id IN(
  SELECT payment_id FROM erp_hr_payment_collection WHERE payment_id IN(
  SELECT payment_id FROM erp_hr_payment_collection WHERE payment_id IN(
  SELECT payment_id FROM erp_hr_payment
   WHERE for_month BETWEEN '2013-04-01' AND '2014-03-31' AND arrear_flag=0
  ) AND element_name='EPF' ) AND element_name='EPFV');
  </code></pre>