@Override
    public long count(final String username) {
        return lock.tryLock(() -> get(username.toLowerCase(Locale.ENGLISH).trim()).size());
    }
This is {@link InMemoryGoogleAuthenticatorTokenCredentialRepository}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-gauth-core/src/main/java/org/apereo/cas/gauth/credential/InMemoryGoogleAuthenticatorTokenCredentialRepository.java