title: CodeIgniter pagination. Total rows
body: <p>I have this problem and i can't find what is wrong.
  So, my Controller:</p>
  
  <pre><code>$config = array();
  $config["base_url"] = base_url() . "products/page/";
  $config["total_rows"] = count($this-&gt;model_add-&gt;countProducts());
  $config["per_page"] = 12;
  $config["uri_segment"] = 4;
  $config["num_links"] = 2;
  $config["use_page_numbers"] = true; 
  </code></pre>
  
  <p>model:</p>
  
  <pre><code>public function countProducts() {
      $query = $this-&gt;db-&gt;query("SELECT * FROM `tdt_articles` WHERE `deleted` = 0 AND `article_type` = 3");
      return $query-&gt;result();
  }
  </code></pre>
  
  <p>My problem is that in my webpage, it shows less pages that it should show. If on <code>$config["total_rows"]</code> i put exact number of records it shows well, but if i count them like is showed there, it doesn't show me all of them. Can't understand at all what is the problem. Hope you'll help me! Thanks!!! </p>