You have provided us code that doesn't work. Could you please fix it?
Next, your question isn't clear. You want the count in each year, ok, count of what? Count of records? You haven't asked SQL to produce counts, you just have asked it to provide the distinct YEAR values in the data set. So I'm confused.
If you want count of records, use PROC FREQ
proc freq data=have;
tables date;
format date year.;
run;
--
Paige Miller