How to Count all with condition Date Now

I try to count all my row with date condition in my web, but I don’t know why my code still didn’t work. I try add (date) in front my column(created_at) but the result:

error “Message: Call to a member function num_rows() on boolean”

This is my code:

    public function hitungPerbaikan()
    {
        $date = new DateTime('now');
        $curr_date = $date->format('Y-m-d');
        $this->db->where('update_at', $curr_date);
        $this->db->where('status >=', '2'); 
        $this->db->from('tbl_kerusakan');
        return $this->db->count_all_results();
    }