old_contents: import cv2
  
  # Get the number of cameras available
  def count_cameras():
      max_tested = 100
      for i in range(max_tested):
          temp_camera = cv2.VideoCapture(i)
          if temp_camera.isOpened():
              temp_camera.release()
              continue
          return i
  
  print(count_cameras())
  
new_contents: import cv2
  
  # Get the number of cameras available
  def count_cameras():
      max_tested = 100
      for i in range(max_tested):
          temp_camera = cv2.VideoCapture(i)
          if temp_camera.isOpened():
              temp_camera.release()
              continue
          return i
  
  print(count_cameras())
  
  
subject: Create number of available cameras via OpenCV