CORE-5002: modified the listing and counting queries to take advantage of the object_id, user_id index in the r_objt_access table
CORE-5002: fixed an SQL error and added the zone to three more functions