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:         true ->
              Collection = type_to_collection(Type),
              Res = execute(Conn, fun() ->
                      SortOrder1 = case SortOrder of 
                          str_ascending -> 1;
                          num_ascending -> 1;
                          str_descending -> -1;
                          num_descending -> -1
                      end,
                      mongo:find(Collection, build_conditions(Conditions), [],
                                 Skip, Max, {Sort, SortOrder1}) 
                  end),
              case Res of
                  {ok, Curs} ->
  