-- @query import_failed_items_count
-- @db importDrive 1.0
-- @param enumeration_id TEXT
SELECT COUNT(*) as FailedCount
FROM importDrive.EnumerationContents
WHERE EnumerationID = ?enumeration_id
  AND IsDirectory = 0
  AND Status != 1
  AND Status != 3
