code: protected function getMerchantCount(array $items)
      {
          $merchants = [];
  
          foreach ($items as $item) {
              $merchants[] = $item->getProduct()->getOrganisation()->getId();
          }
  
          $uniqueMerchants = array_unique($merchants);
  
          return count($uniqueMerchants);
      }
docs: @param array|CartItem[] $items
  
  @return int