Fix for Oracle

Added group-by clause in ORMCountWalker to fix crash in Oracle. Also tested on MySQL.