title: codeigniter pagination total_rows dynamically
body: <p>here is my code and my problem in comment line.</p>
  
  <pre><code>public function sonuc()
  {
      $config['total_rows'] = 5  //i want to set here count of result instead of digit. count($data['sonuc']) does not work.. what will i do?
      $config['per_page'] = 2;
      $data['sonuc'] = $this-&gt;emlak_model-&gt;arama(
                          $config['per_page'], 
                          $this-&gt;uri-&gt;segment(3,0),
                          $this-&gt;input-&gt;post('semt'),
                       ); 
  }
  </code></pre>
  
  <p>if i do it manually with digit, pagination will work, but i want to get total_row of query automatically, what will i do? thanks.</p>