title: What does JPA EntityManager.getSingleResult() return for a COUNT query?
body: <p>What does <code>EntityManager.getSingleResult()</code> return for a COUNT query?</p>
  
  <p>So.. what is the precise runtime type of foo?</p>
  
  <pre><code>Object foo = em.createQuery("SELECT COUNT(t) FROM com.company.Thing t WHERE prop = :param")
         .setParameter("param", value).getSingleResult();
  </code></pre>