public function getBlocksCount($modulesId, $shopId)
    {
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $modulesIdQuery = implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($modulesId));
        $sql = "select COUNT(*)
                            from oxtplblocks
                            where oxactive=1
                                and oxshopid = ?
                                and oxmodule in ( " . $modulesIdQuery . " )";

        return $db->getOne($sql, [$shopId]);
    }