Returns vendor article count

@param string $sVendorId Vendor category Id

@return int
429842
public function getVendorArticleCount($sVendorId)
    {
        // current category unique ident
        $sActIdent = $this->_getUserViewId();

        // loading from cache
        $aVendorData = $this->_getVendorCache();

        if (!$aVendorData || !isset($aVendorData[$sVendorId][$sActIdent])) {
            $iCnt = $this->setVendorArticleCount($aVendorData, $sVendorId, $sActIdent);
        } else {
            $iCnt = $aVendorData[$sVendorId][$sActIdent];
        }

        return $iCnt;
    }
1118110
public function countVisitsByProduct()
    {
        $em = $this->getEntityManager();
        $query = $em->createQuery(
            'SELECT SUM(s.visits) as visit,  '
                . ' p.id, p.name , p.slug, o.latitude, o.longitude, '
                . ' c.id categoryId, c.name categoryName,  '
                . ' b.id brandId, b.name brandName, b.slug brandSlug,  '
                . ' i.path imagePath, '
                . ' p.price,  p.priceType, p.initPrice, p.discount, p.discountType, p.stock, p.active, p.available, p.highlighted, p.freeTransport,  '
                . ' o.id actorId, o.name actorName '
                . ' FROM EcommerceBundle:ProductStats as s '
                . ' LEFT JOIN s.product as p'
                . ' LEFT JOIN p.actor as o'
                . ' LEFT JOIN p.category as c'
                . ' LEFT JOIN p.brand as b '
                . ' LEFT JOIN p.images as i '
                . ' GROUP BY s.product ORDER BY visit DESC'
        );

        $visitas = $query->getResult();

        return $visitas;
    }
1188739
public function pageCount($onlyCompleted = false)
    {
        if ($onlyCompleted) {
            $count = 0;
            foreach ($this->data['pages'] as $page) {
                if ($page['completed']) {
                    $count++;
                }
            }
        } else {
            $count = \count($this->data['pages']);
        }
        return $count;
    }
1362909
public function getDiscountsAmount()
    {
        $discountsAmount = 0;

        if (count($this->getDiscounts())) {
            // Discount amount based on global ticket discounts
            foreach ($this->getDiscounts() as $discount) {
                /** @var \Argentum\Common\Discount $discount */
                $discountsAmount += $discount->getAmount();
            }
        } else {
            // Discount amount based on items discounts
            foreach ($this->getItems() as $item) {
                /** @var \Argentum\Common\Item $item */
                $discountsAmount += $item->getDiscount();
            }
        }

        return $discountsAmount;
    }
971580
protected function getTotal($VisitorsID)
	{
		$VisitorsTotalVisitCount = 0;
    	$VisitorsTotalHitCount   = 0;
	    if ($VisitorsID) 
	    {
    		//Total seit Zählung
    		$objVisitorsTotalCount = \Database::getInstance()
    		        ->prepare("SELECT 
                                    SUM(visitors_visit) AS SUMV, 
                                    SUM(visitors_hit) AS SUMH
                                FROM 
                                    tl_visitors_counter
                                WHERE 
                                    vid=?")
                    ->execute($VisitorsID);
    	    if ($objVisitorsTotalCount->numRows > 0) 
    	    {
    		    $objVisitorsTotalCount->next();
                $VisitorsTotalVisitCount = ($objVisitorsTotalCount->SUMV === null) ? 0 : $objVisitorsTotalCount->SUMV;
                $VisitorsTotalHitCount   = ($objVisitorsTotalCount->SUMH === null) ? 0 : $objVisitorsTotalCount->SUMH;
    	    }
	    }
	    return array('VisitorsTotalVisitCount' => $this->getFormattedNumber($VisitorsTotalVisitCount,0),
	                 'VisitorsTotalHitCount'   => $this->getFormattedNumber($VisitorsTotalHitCount,0)
	                );
	}
1287048
public function playerStat($playerStatId)
	{
		if ( ! isset($this->info['playerStatSummaries'][$playerStatId]))
		{
			return null;
		}

		return $this->info['playerStatSummaries'][$playerStatId];
	}
1122969
public static function getParentCategoryList($categoryId)
    {
        $categoryList = new TIterator();
        $aTmpList = array(); // we store the list in a tmp array so we can reverse the order
        $currentCategoryId = $categoryId;
        $bDone = false;
        $requestInfoService = self::getRequestInfoService();
        $languageService = self::getLanguageService();
        if ($requestInfoService->isBackendMode()) {
            $languageId = $languageService->getActiveEditLanguage()->id;
        } else {
            $languageId = $languageService->getActiveLanguageId();
        }
        do {
            $category = TdbShopCategory::GetNewInstance();
            $category->SetLanguage($languageId);
            if (!$category->Load($currentCategoryId)) {
                $category = null;
                $bDone = true;
            } else {
                $category = $category->GetParent();
                if (!is_null($category)) {
                    $aTmpList[] = $category;
                    $currentCategoryId = $category->id;
                } else {
                    $bDone = true;
                }
            }
        } while (!$bDone);

        $aTmpList = array_reverse($aTmpList);
        foreach ($aTmpList as $tempCategory) {
            $categoryList->AddItem($tempCategory);
        }

        return $categoryList;
    }
356501
public function count()
    {
        $sessionId = $this->getSessionId();
        $userId = $this->auth->id();

        return $this->cartItem->getWithBuilder($this->instance, $this->getSessionId(), $userId)->count();
    }
908118
public function getCountragent($myOrgId, $counteragentOrgId)
    {
        $response = $this->doRequest(
            self::RESOURCE_GET_COUNTERAGENT,
            [
                'myOrgId' => $myOrgId,
                'counteragentOrgId' => $counteragentOrgId
            ]
        );

        return Counteragent::fromStream($response);
    }
1315270
public static function tid(): int
    {
        if (!ServerUtil::coroutineIsEnabled()) {
            return -1;
        }

        $id = SwCoroutine::getuid();

        return self::$idMap[$id] ?? $id;
    }
1279197
public function getArticleId()
    {
        if ($this->_sArticleId === null) {
            // passing wishlist information
            if ($articleId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid')) {
                $this->_sArticleId = $articleId;
            }
        }

        return $this->_sArticleId;
    }
769706
static function fetchProductCountByCategory( $categoryID )
    {
        $ini = eZINI::instance( 'shop.ini' );
        if ( !$ini->hasVariable( 'VATSettings', 'ProductCategoryAttribute' ) ||
             !$categoryAttrName = $ini->variable( 'VATSettings', 'ProductCategoryAttribute' ) )
            return 0;

        $db = eZDB::instance();
        $categoryID =(int) $categoryID;
        $categoryAttrName = $db->escapeString( $categoryAttrName );
        $query = "SELECT COUNT(*) AS count " .
                 " FROM ezcontentobject_attribute coa, ezcontentclass_attribute cca, ezcontentobject co " .
                 "WHERE " .
                 " cca.id=coa.contentclassattribute_id " .
                 " AND coa.contentobject_id=co.id " .
                 " AND cca.data_type_string='ezproductcategory' " .
                 " AND cca.identifier='$categoryAttrName' " .
                 " AND coa.version=co.current_version " .
                 " AND coa.data_int=$categoryID";
        $rows = $db->arrayQuery( $query );
        return $rows[0]['count'];
    }
418
protected function _generateVendorDir($sVendor)
    {
        $sVendorDir = $this->_sModuleDir . $sVendor . DIRECTORY_SEPARATOR;
        if (!file_exists($sVendorDir)) {
            mkdir($sVendorDir);

            // Generate vendor metadata file
            file_put_contents($sVendorDir . 'vendormetadata.php', '<?php');
        }
    }
599857
@Override
	public int countByCommerceCountryId(long commerceCountryId) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_COMMERCECOUNTRYID;

		Object[] finderArgs = new Object[] { commerceCountryId };

		Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);

		if (count == null) {
			StringBundler query = new StringBundler(2);

			query.append(_SQL_COUNT_COMMERCEREGION_WHERE);

			query.append(_FINDER_COLUMN_COMMERCECOUNTRYID_COMMERCECOUNTRYID_2);

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(commerceCountryId);

				count = (Long)q.uniqueResult();

				finderCache.putResult(finderPath, finderArgs, count);
			}
			catch (Exception e) {
				finderCache.removeResult(finderPath, finderArgs);

				throw processException(e);
			}
			finally {
				closeSession(session);
			}
		}

		return count.intValue();
	}
482051
public function count(string $identifier = ''): int
    {
        if ($identifier) {
            return $this->countItems($identifier);
        }

        $menus   = $this->all();
        $counter = 0;

        foreach ($menus as $identifier => $menu) {
            $counter += $this->countItems($identifier);
        }

        return $counter;
    }
139058
public function getChildrenCount($tagId, array $translations = null, $useAlwaysAvailable = true)
    {
        $query = $this->createTagCountQuery($translations, $useAlwaysAvailable);
        $query->where(
            $query->expr->lAnd(
                $query->expr->eq(
                    $this->handler->quoteColumn('parent_id', 'eztags'),
                    $query->bindValue($tagId, null, PDO::PARAM_INT)
                ),
                $query->expr->eq($this->handler->quoteColumn('main_tag_id', 'eztags'), 0)
            )
        );

        $statement = $query->prepare();
        $statement->execute();

        $rows = $statement->fetchAll(PDO::FETCH_ASSOC);

        return (int) $rows[0]['count'];
    }
849195
public function getArticleRatingCount($blIncludeVariants = false)
    {
        if (!$blIncludeVariants) {
            return $this->oxarticles__oxratingcnt->value;
        } else {
            $oRating = oxNew(\OxidEsales\Eshop\Application\Model\Rating::class);

            return $oRating->getRatingCount($this->getId(), 'oxarticle', $this->getVariantIds());
        }
    }