The COUNT function simply counts how many values are in a field.
Values which are NULL are included in the counting. If the field is just an empty set, COUNT returns zero.
SELECT COUNT(Patients) AS [PatientCount]
FROM MediCarePatients
WHERE Date = #06/26/2000#
PatientCount
34
(1 row(s) affected)
This code finds the number of MediCare patients that were in the hospital on June 26, 2000 and stores that number into 'PatientCount'.
Note: The date format in Jet SQL is: #mm/dd/yyyy#.