easy understand solution using Counter with explanation
```\'\'\'\neverytiem we rotate once:\n\nthe first element will be the last element (value will be smaller than or equal to l-1 anyway), then score add 1\n\nminu
```\'\'\'\neverytiem we rotate once:\n\nthe first element will be the last element (value will be smaller than or equal to l-1 anyway), then score add 1\n\nminus score of (number of elements, when the rotate times is bigger than times that we rotate to get i == A[i])\n\nfor A[i], we need to rotate (i-A[i]+l)%l times to achieve i = A[i], we only need to rotate l-1 times to cover all situations. so if we rotate more than (i-A[i]+l)%l times, will result A[i] > i, then we need to minus score 1\n\'\'\'\nclass Solution:\n    def bestRotation(self, nums: List[int]) -> int:\n        l = len(nums)\n        preScore = 0\n        change = [0] * l\n        for i, num in enumerate(nums):\n            if num <= i:\n                preScore += 1\n            change[i] = (i-nums[i]+1+l)%l\n        res = (0, preScore)\n        decreaseCnt = collections.Counter(change)\n        for i in range(1,l):\n            preScore = preScore + 1 - decreaseCnt[i]\n            if preScore > res[1]:\n                res = [i, preScore]\n        return res[0]
[]