anchor.diff:      {not_found, Reason} ->
           case couch_view:get_reduce_view({DbName, <<"_design/", DocId/binary>>, ViewName}) of
           {ok, View} ->
  -            output_reduce_view(Req, View);
  +            case Reduce of
  +            false ->
  +                {reduce, _N, _Lang, MapView} = View,
  +                {ok, RowCount} = couch_view:get_row_count(MapView),
  +                Start = {StartKey, StartDocId},
  +                FoldlFun = make_view_fold_fun(Req, QueryArgs, RowCount,
  +                    fun couch_view:reduce_to_count/1),
  +                FoldAccInit = {Count, SkipCount, undefined, []},
  +                FoldResult = couch_view:fold(MapView, Start, Dir, FoldlFun, FoldAccInit),
  +                finish_view_fold(Req, RowCount, FoldResult);
  +            _ ->
  +                output_reduce_view(Req, View)
  +            end;
           _ ->
               throw({not_found, Reason})
           end
  
positive.code:     start_docid = nil,
      end_docid = {},
      skip = 0,
      group_level = 0
  }).
  
  start_link() ->
  
negative.code:             Args#view_query_args{group_level=exact};
          {"group_level", LevelStr} ->
              Args#view_query_args{group_level=list_to_integer(LevelStr)};
          {"reduce", "true"} ->
              Args#view_query_args{reduce=true};
          {"reduce", "false"} ->
              Args#view_query_args{reduce=false};
          _ -> % unknown key
              Msg = lists:flatten(io_lib:format(
                  "Bad URL query key:~s", [Key])),
  