COUNT Syntax

Count the number of occurrences of a value or several values across a list of variables.

COUNT varnam=varlist(vallist)/[varnam...]

COUNT counts the number of times the specified value(s) appear across a list of variables and stores the result in . If exists it will be overwritten, otherwise a new variable will be created.

is a list of values; you can also use the following keywords: LO (or LOWEST), HI (or HIGHEST), THRU, MISSING and SYSMIS. Some examples:

COUNT never produces a SYSMIS value; if you want e.g. to consider a count of 0 as missing, you will have to add an explicit MISSING VALUES definition for the newly created variable.