jfinkels/flask-restless — pull request #309 by glyphobet (2014-04-25 22:08:47+00:00)
Title: Only use count() optimization if there are no joins

The `count()` helper optimization only works if the current `query.statement` performs no `JOIN`s.
However, if a relation is set to use joined-load, the current `query.statement` will perform a
join, and the `count()` helper will return a number that is the number of objects found for
the current endpoint *multiplied* by the number of objects in each joined-loaded relation.