SQL: Find CAS and EC

SELECT COUNT(*)
FROM master_chems
WHERE
    -- Checks for anything other than exactly two hyphens
    (LENGTH(cas_number) - LENGTH(REPLACE(cas_number, '-', ''))) != 2
    -- Checks for any character that is NOT a digit or a hyphen
    OR cas_number GLOB '*[^0-9-]*'
    -- Checks for empty parts between or around hyphens
    OR cas_number LIKE '%--%'
    OR cas_number LIKE '-%'
    OR cas_number LIKE '%-';
SELECT COUNT(*)
FROM master_chems
WHERE
    -- Checks for anything other than exactly two hyphens
    (LENGTH(ec_number) - LENGTH(REPLACE(ec_number, '-', ''))) != 2
    -- Checks for any character that is NOT a digit or a hyphen
    OR ec_number GLOB '*[^0-9-]*'
    -- Checks for empty parts between or around hyphens
    OR ec_number LIKE '%--%'
    OR ec_number LIKE '-%'
    OR ec_number LIKE '%-';

"You want a toe? I can get you a toe. There are ways, Dude. You don't wanna know about it, believe me."