Well GSquared, you beat me, but one thing. Need to add an alias in the derived table for the column as well:
select count(*)
from
(
SELECT distinct year(cumdate) as YearDt from dbo.EX1_FACT_SO
where year(cumdate) in (year(getdate()),year(getdate())-1)
) dt
My alternative solution was similar as well:
select
count(distinct year(cumdate))
from
dbo.EX1_FACT_SO
where
cumdate >= dateadd(yy, datediff(yy, 0, getdate()) - 1, 0) and
cumdate < dateadd(yy, datediff(yy, 0, getdate()) + 1, 0)