code: @Override
  	@GET
  	@Path("/events/count-by-user")
  	public int countEventsByUser(@QueryParam("earliest") String earliest, @QueryParam("username") String username) throws NotAuthorizedException {
  		accessControlUtils.checkAuthorization(Action.EXECUTE_REPORT, requestContext);
  		
  		SearchCriteria criteria = new SearchCriteria().setEarliest(earliest).setUser(new User(username));
  		
  		return appSensorServer.getEventStore().findEvents(criteria).size();
  	}
docs: {@inheritDoc}