Fred calc_counter_stats: change structure of output

Put everything into a table instead of returning several separate
outputs.  Mostly this is done because I want to add optional flags to
the output.