@Override
    public int count() {
        return isEnabled()
            ? indexedRegisteredServices.size()
            : 0;
    }
This is {@link DefaultRegisteredServiceIndexService}.

@author Misagh Moayyed
@since 7.3.0
core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/query/DefaultRegisteredServiceIndexService.java