anchor.diff:      [erlang:trace(PidSpec, true, [call, {tracer, Pid} | TraceOpts])
        || PidSpec <- PidSpecs],
       lists:sum(Matches).
  +
  +
  +%%%%%%%%%%%%%%%%%%
  +%%% VALIDATION %%%
  +%%%%%%%%%%%%%%%%%%
   
   validate_opts(Opts) ->
       PidSpecs = validate_pid_specs(proplists:get_value(pid, Opts, all)),
  
positive.code:     Pid = setup(count_tracer, [Max]),
      trace_calls(MFAs, Pid, Opts).
  
  trace_calls(MFAs, Pid, Opts) ->
      {PidSpecs, TraceOpts, MatchOpts} = validate_opts(Opts),
      Matches = [begin
  
negative.code: %%% @author Fred Hebert <mononcqc@ferd.ca>
  %%%  [http://ferd.ca/]
  %%% @doc
  %%% `recon_trace' is a module that handles tracing in a safe manner for single
  %%% Erlang nodes, currently for function calls only. Functionality includes:
  %%%
  %%% <ul>
  %%%     <li>Nicer to use interface (arguably) than `dbg' or trace BIFs.</li>
  %%%     <li>Protection against dumb decisions (matching all calls on a node
  %%%         being traced, for example)</li>
  %%%     <li>Adding safe guards in terms of absolute trace count or
  %%%         rate-limitting</li>
  %%%     <li>Nicer formatting than default traces</li>
  %%% </ul>
  %%%
  %%% == Tracing Erlang Code ==
  %%%
  %%% The Erlang Trace BIFs allow to trace any Erlang code at all. They work in
  %%% two parts: pid specifications, and trace patterns.
  %%%
  %%% Pid specifications let you decide which processes to target. They can be
  %%% specific pids, `all' pids, `existing' pids, or `new' pids (those not
  %%% spawned at the time of the function call).
  %%%
  %%% The trace patterns represent functions. Functions can be specified in two
  %%% parts: specifying the modules, functions, and arguments, and then with
  %%% Erlang match specifications to add constraints to arguments (see
  %%% {@link calls/3} for details).
  %%%
  %%% What defines whether you get traced or not is the intersection of both:
  %%%
  %%% <pre>
  %%%         _,--------,_      _,--------,_
  %%%      ,-'            `-,,-'            `-,
  %%%   ,-'              ,-'  '-,              `-,
  %%%  |   Matching    -'        '-   Matching    |
  %%%  |     Pids     |  Getting   |    Trace     |
  %%%  |              |   Traced   |  Patterns    |
  %%%  |               -,        ,-               |
  %%%   '-,              '-,  ,-'              ,-'
  %%%      '-,_          _,-''-,_          _,-'
  %%%          '--------'        '--------' 
  %%% </pre>
  %%%
  %%% If either the pid specification excludes a process or a trace pattern
  %%% excludes a given call, no trace will be received.
  %%%
  %%% == Structure ==
  %%%
  %%% This library is production-safe due to taking the following structure for
  %%% tracing:
  %%%
  %%% <pre>
  %%% [IO/Group leader] <---------------------,
  %%%   |                                     |
  %%% [shell] ---> [tracer process] ----> [formatter]
  %%% </pre>
  %%%
  %%% The tracer process receives trace messages from the node, and enforces
  %%% limits in absolute terms or trace rates, before forwarding the messages
  %%% to the formatter. This is done so the tracer can do as little work as
  %%% possible and never block while building up a large mailbox.
  %%%
  %%% The tracer process is linked to the shell, and the formatter to the
  %%% tracer process. The formatter also traps exits to be able to handle
  %%% all received trace messages until the tracer termination, but will then
  %%% shut down as soon as possible.
  %%%
  %%% In case the operator is tracing from a remote shell which gets
  %%% disconnected, the links between the shell and the tracer should make it
  %%% so tracing is automatically turned off once you disconnect.
  %%% @end
  -module(recon_trace).
  
  %% API
  -export([clear/0, calls/2, calls/3]).
  
  %% Internal exports
  -export([count_tracer/1, rate_tracer/2, formatter/3]).
  
  -type matchspec() :: [{[term()], [term()], [term()]}].
  