@Override
    public long count(final String username) {
        val redisKeyPattern = RedisCompositeKey.forPrincipals().withPrincipal(username).toKeyPattern();
        return casRedisTemplates.getPrincipalsRedisTemplate().boundSetOps(redisKeyPattern).size();
    }
This is {@link RedisGoogleAuthenticatorTokenCredentialRepository}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-gauth-redis/src/main/java/org/apereo/cas/gauth/credential/RedisGoogleAuthenticatorTokenCredentialRepository.java