Hello
I have one problem, I need to create a new variable:

One extrait of my dataset is the following:
id_observation: identification for each observation, there are duplicates
year:
country: 3 country
total observation for each country without discriminate the year
id_observation year country total observations
1107 1996 A 71
1101 1993 A 71
1106 2003 A 71
1105 2007 A 71
1104 1987 A 71
1103 1989 A 71
1102 2007 A 71
1101 1993 A 71
2202 2013 B 114
2201 1975 B 114
2202 2013 B 114
2203 2009 B 114
2204 1993 B 114
2206 2011 B 114
2205 2014 B 114
3304 2002 C 612
3305 2009 C 612
3303 1997 C 612
3303 1997 C 612
3301 2013 C 612
3302 2007 C 612
3308 1981 C 612
3309 2004 C 612
3303 1997 C 612
3303 1997 C 612


I have the total of observations for each country, according to each year I'd like to create one new variable which tells me how many unique observations are in each one, without duplicates

Do you have any advices?

Thank you so much for your help