instruction: count the number of patients whose admission year is less than 2127 and lab test name is thyroxine (t4)?
response: SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2127" AND lab.label = "Thyroxine (T4)"