Fix count() when LIMIT is set
Merge pull request #333 from fluxism/fix-limit

Fix count() when LIMIT is set