[imp] JModelLegacy: Don't try to use "fast" count method for queries with union. Fixes #5108