Refactor counters

Use a separate MessageCounter for throughput instead of element in MessageCounter.
Use new Counter objects instead of native int values in MessageCounter.