Simple solution with counter [code only]
Code\npython\nclass Solution:\n    def countStudents(self, st: List[int], sa: List[int]) -> int:\n        ct = Counter(st)\n        for s in sa:\n            if
# Code\n```python\nclass Solution:\n    def countStudents(self, st: List[int], sa: List[int]) -> int:\n        ct = Counter(st)\n        for s in sa:\n            if ct[s] > 0: \n                ct[s] -= 1\n            else:\n                return ct.total()\n        return 0\n```
['Python3']