anchor.diff:    case bson:lookup(<<"_id">>, Doc) of
       {} -> bson:update(<<"_id">>, mongo_id_server:object_id(), Doc);
       _Value -> Doc
  -  end.
  +  end.
positive.code: 
  
  %% @private
  %% Convert maps or proplists to bson
  prepare_doc(Docs, AssignFun) when is_list(Docs) ->  %list of documents
    case mc_utils:is_proplist(Docs) of
  
negative.code:   }).
  
  %% @doc Count selected documents
  -spec count(pid(), collection(), selector()) -> integer().
  count(Connection, Coll, Selector) ->
    count(Connection, Coll, Selector, #{}).
  
  %% @doc Count selected documents up to given max number; 0 means no max.
  %%     Ie. stops counting when max is reached to save processing time.
  -spec count(pid(), collection(), selector(), map()) -> integer().
  count(Connection, Coll, Selector, Args = #{limit := Limit}) when Limit > 0 ->
    ReadPref = maps:get(readopts, Args, <<"primary">>),
    do_count(Connection, {<<"count">>, Coll, <<"query">>, Selector#{<<"$readPreference">> => ReadPref}, <<"limit">>, Limit});
  count(Connection, Coll, Selector, Args) ->
    ReadPref = maps:get(readopts, Args, <<"primary">>),
    do_count(Connection, {<<"count">>, Coll, <<"query">>, Selector#{<<"$readPreference">> => ReadPref}}).
  
  %% @doc Create index on collection according to given spec.
  %%      The key specification is a bson documents with the following fields:
  