code: @Override
      public long size() {
          try {
              val response = getSearchResultResponse();
              if (LdapUtils.containsResultEntry(response)) {
                  return response.getResult().getEntries()
                      .stream()
                      .map(this.ldapServiceMapper::mapToRegisteredService)
                      .filter(Objects::nonNull).count();
              }
          } catch (final LdapException e) {
              LOGGER.error(e.getMessage(), e);
          }
          return 0;
      }
docs: {@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