There are two types you could use, MapResult and/or ReduceResult. Based on how you want to structure your output, you could potentially only use the MapResult Type. If you want to aggregate and get a count for the entire dataset, you will want to use the same outKey value for all your map tasks and then return the sum from your reduce function.

For MapResult, you can fetch the output by using a combination of the run id for the MapReduce job and the output key. The runIdAndOutKey field is the partition key field for this Type and uses the following format, <runId>-<outKey>. You can get the run id from the MapReduce job record, c3ShowFunc(MapReduce, ‘run’), and then you would need to know the domain of the outKey values. If you have this information, you can then query this type using the following command, MapResult.fetch({filter: "runIdAndOutKey=='<runId>-<outKey>'", limit: 10}).

As you can see, it is not very straightforward to fetch this information from the MapResult Type. I would recommend having a reduce phase for your job and using the ReduceResult Type to fetch the result. You can then just use the run id from your MapReduce job to get the output results, ReduceResult.fetch({filter: "run.id=='<runId>'"}).

One thing to note, is that the output type for your map function above is not correct. You need to return a Map Type. In your case, if you wanted to get a count for the entire dataset, you could return something like {"count": count} from your map function and then your reduce function would be