statistical counters

Per thread variable based statistical counters.