}
private MapReduceSpecification<Entity, String, Long, KeyValue<String, Long>,
List<List<KeyValue<String, Long>>>> getCountJobSpec(int mapShardCount, int reduceShardCount) {
Query query =
new Query(datastoreType).setFilter(new FilterPredicate("foo", FilterOperator.EQUAL, "bar"));
return new MapReduceSpecification.Builder<>(new DatastoreInput(query, mapShardCount),
new CountMapper(), new CountReducer(), new InMemoryOutput<KeyValue<String, Long>>())
.setKeyMarshaller(Marshallers.getStringMarshaller())
.setValueMarshaller(Marshallers.getLongMarshaller())