[GEOS-6088] Add support for count in json output