public function count()
    {
        // get database connection
        $db = $this->getDBConnection("READ");
        if ($this->_fetch4countQuery) {
            $querySQL = $this->_fetch4countQuery;
        } else {
            $querySQL = $this->getSQLHelper()->buildQuerySQL($this);
        }
        $this->_fetch4countQuery = null;
        return $this->_getNumberRecords($db, $querySQL);
    }