code: public long count(List<Predicate> predicates) {
  
  		// Criteria Builder
  		CriteriaBuilder criteriaBuilder = getEntityManager().getCriteriaBuilder();
  		
  		// Requete de criteres
  		CriteriaQuery<Long>criteriaQuery = criteriaBuilder.createQuery(Long.class);
  		
  		// Construction de la racine
  		Root<T> root = criteriaQuery.from(entityClass);
  
  		// On positionne l'Alias
  		root.alias(ROOT_ALIAS);
  		
  		// Selection de la racine
  		criteriaQuery.select(criteriaBuilder.count(root));
  
  		// Ajout des Prédicats
  		addPredicates(criteriaBuilder, root, criteriaQuery, predicates);
  
  		// Construction de la requete basée sur les critères
  		TypedQuery<Long> query = getEntityManager().createQuery(criteriaQuery);
  		
  		// On retourne le resultat
  		return query.getSingleResult();
  	}
docs: /*
  (non-Javadoc)
  @see net.leadware.persistence.tools.core.dao.JPAGenericDAO#count(java.util.List)