@Override
    public long count(final String username) {
        return lock.tryLock(() -> {
            val accounts = readAccountsFromJsonRepository();
            return accounts.containsKey(username.trim().toLowerCase(Locale.ENGLISH)) ? accounts.get(username.trim().toLowerCase(Locale.ENGLISH)).size() : 0;
        });
    }
This is {@link JsonGoogleAuthenticatorTokenCredentialRepository}.

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