incorrect sql for limit + count (DM 1.0)
In DM 1.0, the expression Foo.all(:limit=>2).count
produces the query
SELECT COUNT(*) FROM
foos LIMIT 2
which is incorrect, as the precedence of LIMIT applies to the one row
returned by count.
This is a big deal with many pagination plugins.