public static function fetchCount($section_id = null, $where = null, $joins = null, $group = false)
    {
        if (is_null($section_id)) {
            return false;
        }

        $section = SectionManager::fetch($section_id);

        if (!is_object($section)) {
            return false;
        }

        return Symphony::Database()->fetchVar('count', 0, sprintf("
                SELECT COUNT(%s`e`.id) as `count`
                FROM `tbl_entries` AS `e`
                %s
                WHERE `e`.`section_id` = %d
                %s
            ",
            $group ? 'DISTINCT ' : '',
            $joins,
            $section_id,
            $where
        ));
    }
public static function fetchCount($section_id = null, $where = null, $joins = null, $group = false)
    {
        if (is_null($section_id)) {
            return false;
        }

        $section = SectionManager::fetch($section_id);

        if (!is_object($section)) {
            return false;
        }

        return Symphony::Database()->fetchVar('count', 0, sprintf("
                SELECT COUNT(%s`e`.id) as `count`
                FROM `tbl_entries` AS `e`
                %s
                WHERE `e`.`section_id` = %d
                %s
            ",
            $group ? 'DISTINCT ' : '',
            $joins,
            $section_id,
            $where
        ));
    }
public static function fetchCount ( $ section_id = null , $ where = null , $ joins = null , $ group = false ) { if ( is_null ( $ section_id ) ) { return false ; } $ section = SectionManager :: fetch ( $ section_id ) ; if ( ! is_object ( $ section ) ) { return false ; } return Symphony :: Database ( ) -> fetchVar ( 'count' , 0 , sprintf ( "
                SELECT COUNT(%s`e`.id) as `count`
                FROM `tbl_entries` AS `e`
                %s
                WHERE `e`.`section_id` = %d
                %s
            " , $ group ? 'DISTINCT ' : '' , $ joins , $ section_id , $ where ) ) ; }
Return the count of the number of entries in a particular section.

@param integer $section_id
The ID of the Section where the Entries are to be counted
@param string $where
Any custom WHERE clauses
@param string $joins
Any custom JOIN's
@param boolean $group
Whether the entries need to be grouped by Entry ID or not
@return integer
Return the count of the number of entries in a particular section .