Easy Python Solution
\n# Code\n\nclass Solution:\n    def countWays(self, ranges: List[List[int]]) -> int:\n        ranges.sort(key=lambda k:(k[0], k[1]))\n        final = []\n     
\n# Code\n```\nclass Solution:\n    def countWays(self, ranges: List[List[int]]) -> int:\n        ranges.sort(key=lambda k:(k[0], k[1]))\n        final = []\n        final.append(ranges[0])\n\n        for curr in ranges[1:]:\n            if final[-1][1] >= curr[0]:\n                final[-1][1] = max(final[-1][1], curr[1])\n            else:\n                final.append(curr)\n            \n        t = len(final)\n\n        return pow(2, t, 10**9+7)\n\n\n        \n```
['Python3']