title: Flask-SQLAlchemy different record count for .count() and .all()
body: <p>In SQLAlchemy, <code>ModelName.query.filter_by(field_name=value).count()</code> returns correct record count, but <code>ModelName.query.filter_by(field_name=value).all()</code> only returns a single record. Doing a <code>db.session.execute("SELECT * FROM table_name WHERE field_name = 'value'")</code> works fine.  Has anybody faced a similar problem? Does anyone have any idea what could possibly be wrong. Any pointers will help.</p>
  
  <p><strong>Information that might be helpful</strong><br>
  I am using MS SQL Server 2008 R2 and accessing it using FreeTDS/pyodbc. I do not control the database and can not change it. </p>
  
  <p>Thanks in advance.</p>