anycount(varlist), values(integer numlist) may not be combined with by. It returns the number of variables in varlist for which values are equal to any integer value in a supplied numlist. Values for any observations excluded by either if or in are set to 0 (not missing). Also see anyvalue(varname) and anymatch(varlist).
count(exp) (allows by varlist:) creates a constant (within varlist) containing the number of nonmissing observations of exp. Also see rownonmiss() and rowmiss().