protected function getActivePriceAlarmsCount()
    {
        // #1140 R - price must be checked from the object.
        $query = "
            SELECT oxarticles.oxid, oxpricealarm.oxprice
            FROM oxpricealarm, oxarticles
            WHERE oxarticles.oxid = oxpricealarm.oxartid AND oxpricealarm.oxsended = '000-00-00 00:00:00'";
        $result = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->select($query);
        $count = 0;

        if ($result != false && $result->count() > 0) {
            while (!$result->EOF) {
                $article = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
                $article->load($result->fields[0]);
                if ($article->getPrice()->getBruttoPrice() <= $result->fields[1]) {
                    $count++;
                }
                $result->fetchRow();
            }
        }

        return $count;
    }