title: Evaluating Query() as bool
body: <p>In SQL Alchemy, an instance of a Query class is returned from each session query made.</p>
  
  <p>I tried to evaluate the query like this, expecting it to behave in a similar way to a list:</p>
  
  <p><code>if session.query(...).filter_by(...):</code></p>
  
  <p>However it always evaluated to true, so I ended up doing this instead:</p>
  
  <p><code>if session.query(...).filter_by(...).count():</code></p>
  
  <p>Which seems a bit long-winded and incorrect. Is there a better way to check whether a query will return results?</p>