Changed to use JPA count to improve discover performance