anchor.diff:  remove_first_element(Tuple) when is_tuple(Tuple) ->
       list_to_tuple(tl(tuple_to_list(Tuple))).
   
  -i_num_calls(_MFA, [], Count) ->
  -    Count;
  -i_num_calls(MFA, [{MFA, _Result} | Rest], Count) ->
  -    i_num_calls(MFA, Rest, Count + 1);
  -i_num_calls(MFA, [{MFA, _ExType, _Exception, _Stack} | Rest], Count) ->
  -    i_num_calls(MFA, Rest, Count + 1);
  -i_num_calls(MFA, [_Call | Rest], Count) ->
  -    i_num_calls(MFA, Rest, Count).
  -
  -has_call(FuncMatch, History) ->
  -    [] =/= match_history([{{FuncMatch, '_'}, [], ['$_']},
  -                          {{FuncMatch, '_', '_', '_'}, [], ['$_']}], History).
  +has_call(MFA, History) ->
  +    [] =/= match_history(match_mfa(MFA), History).
  +
  +num_calls(MFA, History) ->
  +    length(match_history(match_mfa(MFA), History)).
   
   match_history(MatchSpec, History) ->
       MS = ets:match_spec_compile(MatchSpec),
       ets:match_spec_run(History, MS).
  +
  +match_mfa(MFA) ->
  +    [{{MFA, '_'}, [], ['$_']},
  +     {{MFA, '_', '_', '_'}, [], ['$_']}].
  
positive.code: -spec num_calls(Pid::pid(), Mod::atom(), Fun::atom(), Args::list())
   -> non_neg_integer().
  num_calls(Pid, Mod, Fun, Args) ->
      i_num_calls({Mod, Fun, Args}, meck:history(Pid, Mod), 0).
  
  %%==============================================================================
  %% Callback functions
  
negative.code: %% returns the result.
  -spec num_calls(Mod::atom(), Fun::atom(), Args::list()) -> non_neg_integer().
  num_calls(Mod, Fun, Args) ->
      num_calls({Mod, Fun, Args}, meck:history(Mod)).
  
  %% @spec num_calls(Pid:: pid(), Mod:: atom(), Fun:: atom(),
  %%                   Args:: list(term())) -> non_neg_integer()
  