title: how to cast COUNT return type in Doctrine
body: <p>I'd like to know if there's a way to convert/cast the count type that doctrine returns,</p>
  
  <p>When I do <br></p>
  
  <pre><code>$queryBuilder-&gt;select('p.idPublication,
      p.publicationName as name,
      p.publicationDescription as description,
      p.publicationPhoto as photoPublication')
   -&gt;addSelect('(SELECT COUNT(com.idCommentaire)FROM PublicationBundle:Commentaire com
      WHERE com.publication = p.idPublication) as comments')
  </code></pre>
  
  <p>... <br></p>
  
  <p>I get the comments  as string. how can I convert the <code>COUNT</code> result to int.</p>
  
  <p>Thank you all.</p>