Fixed getting the count for queries with the union
Fixes #2851.
Merge pull request #2850 from Koudy/db-query-queryScalar

Fixed getting the count for queries with the union
Fixes #2848: Individual queries should be enclosed within parenthesis in a UNION query
Fixes #2825: `Request::getBodyParams()` should correctly parse CONTENT TYPE.