public Mono<Long> countGroups(
            @Nullable Set<Long> ids,
            @Nullable Set<Long> typeIds,
            @Nullable Set<Long> creatorIds,
            @Nullable Set<Long> ownerIds,
            @Nullable Boolean isActive,
            @Nullable DateRange creationDateRange,
            @Nullable DateRange deletionDateRange,
            @Nullable DateRange lastUpdatedDateRange,
            @Nullable DateRange muteEndDateRange,
            @Nullable Set<Long> memberIds) {
        if (CollectionUtil.isEmpty(memberIds)) {
            return groupRepository.countGroups(ids,
                    typeIds,
                    creatorIds,
                    ownerIds,
                    isActive,
                    creationDateRange,
                    deletionDateRange,
                    lastUpdatedDateRange,
                    muteEndDateRange);
        }
        return queryGroupIdsFromGroupIdsAndMemberIds(ids, memberIds).flatMap(groupIds -> {
            if (groupIds.isEmpty()) {
                return PublisherPool.LONG_ZERO;
            }
            return groupRepository.countGroups(groupIds,
                    typeIds,
                    creatorIds,
                    ownerIds,
                    isActive,
                    creationDateRange,
                    deletionDateRange,
                    lastUpdatedDateRange,
                    muteEndDateRange);
        });
    }
@implNote We don't need to check if the group count with the specified type owned by the
          requester exceeds here because it is implemented in
          {@link GroupService#isAllowedToCreateGroup}
turms-service/src/main/java/im/turms/service/domain/group/service/GroupService.java