function count() { $sSql = $this->getCountQuery(); $rSql = $GLOBALS["DB"]->query($sSql); if (($aRs = $rSql->fetch()) !== false) { return intval($aRs["nbitems"]); } return 0; }