private RegisteredService insert(final RegisteredService rs) {
        rs.assignIdIfNecessary();
        val entry = this.ldapServiceMapper.mapFromRegisteredService(ldapProperties.getBaseDn(), rs);
        connectionFactory.executeAddOperation(entry);
        return rs;
    }
{@inheritDoc}
This may be an expensive operation.
In order to count the number of available definitions in LDAP,
this call will attempt to execute a search query to load services
and the results will be counted. Do NOT attempt to call this
operation in a loop.

@return number of entries in the service registry
support/cas-server-support-ldap-service-registry/src/main/java/org/apereo/cas/adaptors/ldap/services/LdapServiceRegistry.java