anchor.diff:  handle_temp_view_req(Req, _Db) ->
       send_method_not_allowed(Req, "POST").
   
  +output_map_view(Req, View, QueryArgs) ->
  +    #view_query_args{
  +        count = Count,
  +        direction = Dir,
  +        skip = SkipCount,
  +        start_key = StartKey,
  +        start_docid = StartDocId
  +    } = QueryArgs,
  +    {ok, RowCount} = couch_view:get_row_count(View),
  +    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(View, Start, Dir, FoldlFun, FoldAccInit),
  +    finish_view_fold(Req, RowCount, FoldResult).
   
   output_reduce_view(Req, View) ->
       #view_query_args{
  
positive.code:     case proplists:get_value(<<"reduce">>, Props, null) of
      null ->
          {ok, View} = couch_view:get_map_view({temp, couch_db:name(Db), Language, MapSrc}),
          Start = {StartKey, StartDocId},
          
          {ok, TotalRows} = couch_view:get_row_count(View),
          
          FoldlFun = make_view_fold_fun(Req, QueryArgs, TotalRows,
                  fun couch_view:reduce_to_count/1),
          FoldAccInit = {Count, SkipCount, undefined, []},
          FoldResult = couch_view:fold(View, Start, Dir, fun(A, B, C) ->
              FoldlFun(A, B, C)
          end, FoldAccInit),
          finish_view_fold(Req, TotalRows, FoldResult);
  
      RedSrc ->
          {ok, View} = couch_view:get_reduce_view(
                  {temp,  couch_db:name(Db), Language, MapSrc, RedSrc}),
  
negative.code:             case Reduce of
              false ->
                  {reduce, _N, _Lang, MapView} = View,
                  output_map_view(Req, MapView, QueryArgs);
              _ ->
                  output_reduce_view(Req, View)
              end;
  