title: Aggregate functions in Magento ORM
body: <p>How to use aggregate functions like sum(), count() in Magento ORM.</p>
  
  <p>Consider there is a table "test" with following values</p>
  
  <pre>
  <code>
  -------------------------------------
  productid           |          qty
  -------------------------------------
  1                   |            2
  -------------------------------------
  2                   |            3
  -------------------------------------
  3                   |            5
  -------------------------------------
  </code>
  </pre>
  
  <p>and if i mapped this table in my module,so that i can get collection data like</p>
  
  <pre>
  <code>
  $_collection = Mage::getModel('mymodule/customcart')->getCollection();
  </code>
  </pre>
  
  <p>how do i get result equivalent to below query with COLLECTION?</p>
  
  <pre>
  <code>
  select sum(qty) from test;
  </code>
  </pre>