Modification to allow a QueryModifierDelegate to know when JPAContainer
is constructing a query to do a count.

This allows the Delegate to modify the query so that the JPAContainer's
count clause wont throw errors.

Fixes some issues with using GroupBy clauses