1. オブジェクトを使う
class A:
 def __init__(self):
  count = 0
 def __call__(self, *args):
  count += 1
  〜

2. 関数と引数デフォルト値の仕組みを流用する
def f(a, b, c, count=0):
 count += 1
 〜
>>40 1のがいいと思う
2だとcountの値を関数の外から取り出せない?かも