Is there another way to count no of rows returned by a query.The following code returns 1 even though there is no result returned.(i am working on ZEND).
$this->view->overdue_query = $overdue_query->fetchAll();
/*Get overdue count */
$this->view->overdue_count = count($overdue_query);
it should be instead