title: spring data mongo - mongotemplate count with query hint
body: <p>The <a href="http://docs.mongodb.org/manual/reference/method/cursor.count/" rel="noreferrer">mongo docs</a> specify that you can specify a query hint for count queries using the following syntax:</p>
  
  <pre><code>db.orders.find(
     { ord_dt: { $gt: new Date('01/01/2012') }, status: "D" }
  ).hint( { status: 1 } ).count()
  </code></pre>
  
  <p>Can you do this using the mongo template?  I have a <code>Query</code> object and am calling the <code>withHint</code> method.  I then call <code>mongoTemplate.count(query);</code>  However, I'm pretty sure it's not using the hint, though I'm not positive.</p>