public function count($coraDbQuery = false)
    {
        // If no query builder object was passed in, then grab the gateway's.
        if (!$coraDbQuery) {
            $coraDbQuery = $this->gateway->getDb();
        }
        $coraDbQuery = $this->model::model_constraints($coraDbQuery);
        return $this->gateway->count($coraDbQuery);
    }