anchor.diff:  count(Conn, Type, Conditions) ->
       Collection = type_to_collection(Type),
       {ok, Count} = execute(Conn, fun() -> 
  -                mongo:count(Collection, proplist_to_tuple(Conditions))
  +                C = build_conditions(Conditions),
  +%                ?LOG("Conditions", C),
  +                mongo:count(Collection, C)
           end),
  +%    ?LOG("Count", Count),
       Count.
   
   counter(Conn, Id) when is_list(Id) ->
  
positive.code:         {failure, Reason} -> {error, Reason};
          {connection_failure, Reason} -> {error, Reason}
      end.
  
  proplist_to_tuple(PropList) ->
      ListOfLists = lists:reverse([[K,V]||{K,V} <- PropList]),
  
negative.code:     ["UPDATE ", TableName, " SET ", string:join(Updates, ", "),
          " WHERE id = ", pack_value(Id)].
  
  add_cond(Acc, Key, Op, PackedVal) ->
      [lists:concat([Key, " ", Op, " ", PackedVal, " AND "])|Acc].
  
  