If det_factura also a mapped object, then this request should do this:
qry = (session.query(func.count(det_factura.id)) .filter(det_factura.company==31) .filter(det_factura.date.like('2010-05%')) )
If this is an instance of table , that should work below:
qry = select([func.count(det_factura.id)], and_(det_factura.company==31, det_factura.date.like('2010-05%') ) )
source share