Question: why does clear_limit default to True (simply for backwards compatibility?)
I agree and have updated wrapped_count() to have `clear_limit` default to `False`. I also added the option to pass that parameter through the call to `count()`. Finally, I made it so that calls to `count()` for queries that have a limit or offset will use wrapped_count() instead.
 If for some reason I have misunderstood your concerns, please leave a comment. Based on my understanding of your comments I think I've fixed the behavior of count. Thanks for taking the time to bring these issues to my attention. I hope that you'll keep submitting quality issues like these!
 Everything looks great to me -- your commit addresses my concerns perfectly.

My only question at this point would be whether anyone out there is depending on the current behaviour. But hopefully not -- and it could be something you could perhaps handle better with a comment in the release notes or docs for the next version. I've checked flask-admin's peewee module, and it has no problems in either case, because it calls .count() before the limit is applied anyway.

I realise it may well break backwards compatibility to change anything at this point, but I'm interested in understanding the rationale, if any, for the way things are, so I can grok the API better.

As far as I see it, LIMIT and OFFSET are genuinely part of a given query -- if I want to know the total number of results, I will execute .count() on a query with no limit/offset. If I want to know how many results in a query filtered by a column, then I'll execute .count() on that query, and expect the filtered number of results. Thus, if I execute .count() on a query filtered by limit/offset, I expect the result to be the limited number.

Any reason for the default being the opposite to what I expect?

(I haven't tested this, but I believe both SQLAlchemy and Django ORM work in the way I'd expect -- not that that's necessarily a point in favour, just an interesting reference. Looks like SQLAlchemy may have struggled with this a bit, and settled on an always-does-what-you'd-expect answer using a subquery: http://docs.sqlalchemy.org/en/rel_0_9/orm/tutorial.html#counting)
