title: How to limit the number of result within Magento?
body: <p>I've a recent products action in my Catalog/Product controllers.</p>
  
  <p>I retrieve <strong>all</strong> the product sorted by entity id. Works great ok.</p>
  
  <p>The problem is I just want to show 20 products in 4 pages.</p>
  
  <p>I tried to extend <code>Mage_Catalog_Block_Product_List</code> and override <code>_getProductCollection()</code> and I did something like this:</p>
  
  <pre><code>$this-&gt;_productCollection = Mage::getModel('catalog/product')-&gt;getCollection()
                  -&gt;addAttributeToSort('entity_id', 'desc')
                  -&gt;addStoreFilter();
  </code></pre>
  
  <p>And the important part:</p>
  
  <pre><code>$this-&gt;_productCollection-&gt;getSelect()-&gt;limit($this-&gt;getProductsLimit());
  </code></pre>
  
  <p>If I 'dump' the returned Object I've something like this:</p>
  
  <p>["limitcount"] => int(5)
   ["limitoffset"] => int(0)</p>
  
  <p>So it looks to be overriden by the paginator.</p>
  
  <p>Do you know a way to limit properly the number of result?</p>
  
  <p>For both optimization and presentation I actually don't want to retrieve all the products collection.</p>
  
  <p>Thank you</p>