code: public org.grails.datastore.mapping.query.api.ProjectionList countDistinct(String propertyName, String alias) {
          final CountProjection proj = Projections.countDistinct(calculatePropertyName(propertyName));
          addProjectionToList(proj, alias);
          return this;
      }
docs: Adds a projection that allows the criteria to return the distinct property count
  
  @param propertyName The name of the property
  @param alias The alias to use