src/Entities/Policies/LimitedMerchantCartPolicy.php
protected function getMerchantCount(array $items)
    {
        $merchants = [];

        foreach ($items as $item) {
            $merchants[] = $item->getProduct()->getOrganisation()->getId();
        }

        $uniqueMerchants = array_unique($merchants);

        return count($uniqueMerchants);
    }
protected function getMerchantCount(array $items)
    {
        $merchants = [];

        foreach ($items as $item) {
            $merchants[] = $item->getProduct()->getOrganisation()->getId();
        }

        $uniqueMerchants = array_unique($merchants);

        return count($uniqueMerchants);
    }
@param array|CartItem[] $items

@return int