Super Intuitive 8 line Python Solution
Code\n\nclass Solution:\n    def countWays(self, ranges: List[List[int]]) -> int:\n        ranges.sort()\n        x, R = len(ranges), ranges[0][1]\n        for 
# Code\n```\nclass Solution:\n    def countWays(self, ranges: List[List[int]]) -> int:\n        ranges.sort()\n        x, R = len(ranges), ranges[0][1]\n        for l,r in ranges[1:]:\n            if l <= R: x-=1\n            R = max(r, R)\n        return 2**x % (10**9+7)\n```
['Python3']