'Test function call counting.'

def testCountingDecorator(self):

    stats.STATS.RegisterCounterMetric('test_counter')
    for _ in range(10):
        self.CountedFunc()
    self.assertEqual(stats.STATS.GetMetricValue('test_counter'), 10)
