Object manager = CM_GetCameraManager()
Object cameraList = CM_GetCameras(manager)
Object camera = ObjectAt(cameraList, 0)
CM_SelectCamera(manager, camera)
TagGroup defectList = CM_CCD_GetSystemDefectLocations(camera,"")
number numDefects = defectList.TagGroupCountTags()
result(numDefects)