In most counting scenarios in Excel, COUNTBLANK reliably counts blank cells, and COUNTA reliably counts populated cells.
Select all the relevant cells, and in the Data tab, click the main part of the split "Data Validation" button. Then, click ...