@vaibhav-kaushal The tests presume the installation of the examples database.

@olegabr I understand your point. I know the generated code does the right thing. I am conjecturing that someone removed the limit clause from counting on purpose long ago for a reason, and that there is code out there that relies on that fact. Perhaps you can do a Blame and see why this got removed. 

For this particular pull request, I would like to see the two issues separated. It will mean that they will have a merge conflict in the test code, unless you base the QueryCount fix on the fix for accepting arrays. Generally, we should not mix fixes for two separate issues into one bug fix. For features, you can do a lot, but bug fixes should be targeted. If someone IS relying on QueryCount ignoring limit clauses, their code will break in strange ways that will be hard to figure out at first. So, the answer is to strongly highlight that in release notes and in comments in the code. So, I guess I am saying that I agree we should change this, but it should be done in a separate pull request and heavily documented.