@Override
	public long count(User user, Status[] statuses) {
		Specification<PerfTest> spec = Specification.where(idEmptyPredicate());

		// User can see only his own test
		if (user != null) {
			spec = spec.and(createdBy(user));
		}

		if (statuses.length == 0) {
			return 0;
		} else {
			return perfTestRepository.count(spec.and(statusSetEqual(statuses)));
		}

	}
Get {@link PerfTest} list on the user.

@param user user
@return found {@link PerfTest} list
ngrinder-controller/src/main/java/org/ngrinder/perftest/service/PerfTestService.java