Counting function is 'stupid' on purpose, it saves huge amount of resources on a task which is not really that critical. It's best to run it as less frequently as possible, e.g. once in a while (at best, once a month) should be enough, but if the code is done right inside plugins, you won't even need to run this fix at all, actually, 'dumb' counting functions should be ok.