input: Write a python function to solve the following problem:
  
  Implement a function to handle an integer limit and a 2D list of size n x 2 called queries. The situation involves limit + 1 balls, each uniquely labeled in the range [0, limit]. Initially, these balls have no colors. For each query in queries represented by [x, y], you need to color ball x with color y. After processing each query, determine the number of unique colors present across all balls.
  
  The function should return a list of integers, with each integer representing the count of distinct colors after each corresponding query.
  
  Note:
  The absence of any color does not count as a color.
  
  Examples:
  >>> limit = 4, queries = [[1,3],[0,2],[1,5],[2,3]]
  [1,2,2,3]
  >>> limit = 5, queries = [[0,2],[2,4],[1,3],[3,3],[4,2]]
  [1,2,3,3,3]
  
  Constraints:
  1 <= limit <= 10^9
  1 <= n == len(queries) <= 10^5
  queries[i].length == 2
  0 <= queries[i][0] <= limit
  1 <= queries[i][1] <= 10^9
output: def handle_queries(limit, queries):
      ball_colors = {}
      unique_colors = set()
      result = []
      
      for x, y in queries:
          if x in ball_colors:
              unique_colors.discard(ball_colors[x])
          ball_colors[x] = y
          unique_colors.add(y)
          result.append(len(unique_colors))
      
      return result