public long count(final String uid) {
        val query = List.of(
            DynamoDbQueryBuilder.builder()
                .key(ColumnNames.USERID.getColumnName())
                .attributeValue(List.of(AttributeValue.builder().s(uid.toLowerCase(Locale.ENGLISH)).build()))
                .operator(ComparisonOperator.EQ)
                .build());
        return getRecordsByKeys(query).size();
    }
Count.

@param uid the uid
@return the long
support/cas-server-support-gauth-dynamodb/src/main/java/org/apereo/cas/gauth/token/GoogleAuthenticatorDynamoDbTokenRepositoryFacilitator.java