Issue #1145080 by David_Rothstein, Noe_, drewish, hosef, bigjim: Fixed SelectQuery::countQuery() incompatible with UNION queries.