src/CI_Base_Model.php
public function count_by()
    {
        $where = func_get_args();
        $this->_set_where($where);
        $this->apply_soft_delete_filter();

        return $this->_database->count_all_results($this->_table);
    }
public function count_by()
    {
        $where = func_get_args();
        $this->_set_where($where);
        $this->apply_soft_delete_filter();

        return $this->_database->count_all_results($this->_table);
    }
Fetch a count of rows based on an arbitrary WHERE call.