protected BigDecimal calculateScoreBasedOnEventsCount(final Authentication authentication,
                                                          final List<? extends CasEvent> events,
                                                          final long count) {
        val eventCount = events.size();
        if (count == eventCount) {
            LOGGER.debug("Principal [{}] is assigned to the lowest risk score with attempted count of [{}]",
                authentication.getPrincipal(), count);
            return AuthenticationRiskScore.lowestRiskScore().getScore();
        }
        return getFinalAveragedScore(count, eventCount);
    }
This is {@link BaseAuthenticationRequestRiskCalculator}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-electrofence/src/main/java/org/apereo/cas/impl/calcs/BaseAuthenticationRequestRiskCalculator.java