The Query operation in the map service does not return the extent when the returnExtentOnly and returnCountOnly parameters are both set to true and an input geometry is applied.
This issue is no longer reproducible. Upgrade to ArcGIS Server 11.4 or above should resolve this issue. If still persisted, please contact Esri Support.