Hello Stata professionals,

I have a Data set of different ID's, each ID has observations from their age 20 up to age 55 with country of origin and year, in which they are at each age.
I have now generatet a variable where you can see whether there is a economic crisis =1 or not=0 in each year and country of origin.
now i want to count the number of crisis these people have had during their age 20 and 55:
How do I do it ?

example of first 5 rows:

+----------------------------------------------------------+
mergeid yrbirth age year country crisis_1

1. AT-001215-01 1939 43 1982 Austria 0
2. AT-001215-01 1939 30 1969 Austria 0
3. AT-001215-01 1939 26 1965 Austria 0
4. AT-001215-01 1939 41 1980 Austria 0
5. AT-001215-01 1939 25 1964 Austria 0

***there are way more mergeid's than just one