Prevent statements with count() and order by parts for PostgrSQL
In PostgreSQL it is not allowed to use a COUNT statement with an ORDER BY statement as long as the field for sorting not available in GROUP BY clause. Therefor we have to parse the SQL and drop ORDER BY clause for selections with a count.
IMHO this is an important fix as otherwise it is not possible the use all the features from extbase. I got an error while using the Backend user extension provided by the current master.