state is the 3rd parameter, field the 1st
this is from Qlik help
getselectedcount (FieldName [, IncludeExcluded [, State]])
Returns the current number of selected values in a field. It is possible to query an alternate state.
If IncludeExcluded is true the count will include selected values, which are currently excluded by selections in other fields. If false or omitted these values will not be included.
State is the alternate state to query.
getselectedcount ( Year )
getselectedcount ( Year, true( ) )