title: How to use count in ormlite
body: <pre><code>List&lt;HoraireDb&gt; horaires_reels = null;
  try {   
  Dao&lt;HoraireDb, Integer&gt; dao = App.getHelper().getHoraireDao();
  QueryBuilder&lt;HoraireDb, Integer&gt; builder = dao.queryBuilder();
  Where where = builder.where();
  where.eq("isprevis", false);
  where.and();
  where.eq("idactivite", Param.getIdActivite(App.getContext()));
  where.and();
  where.eq("jour",moment);
  where.and();
  where.isNotNull("debut");
  where.and();
  where.isNotNull("fin");
  where.and();
  where.ne("etat", "D");
  where.and();
  where.isNull("idabsence");
  where.and();
  where.lt("fin",moment);
  
  horaires_reels = dao.query(builder.prepare());
  } catch (SQLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
  }
  </code></pre>
  
  <p>I want to return an <code>int</code> just the number of rows, because returning a list takes too much time. I want to know if there's any way to use <code>countof()</code> for in my code?</p>
  
  <p>I found in stackoverflow this answer but didn't work for me :</p>
  
  <pre><code>int numRows = dao.queryBuilder().where().eq("name", "Joe Smith").countOf();
  </code></pre>