To really understand how it works, it's important to understand the difference between 龄/纪/数, as "年" & "岁" means the same in these words, referring to the "age".
龄: it is written as 齿 and 令, in ancient time, 齿 used to mean "age", while "令" stands for military service. Hence, in the very beginnng, 龄 meant the age to serve the military service. Later, it was also considered as the "legal age", or an age that is recognized by the hierarchy or orginisation. That is why there is only "法定年龄"/"(法定)退休年龄"/"(法定)入学年龄"/"党龄"(the age served for the Party)/"工龄"(the age served for the company) etc. Nowadays, the meaning has extended to "age" in general,so it is commenly used in daily conversations when asking about ages of a person; in these circumstances, "年龄" is the same as "岁数"/"年纪".
ref: https://baike.baidu.com/item/%E9%BE%84
纪: In ancient China, 纪 is a method to count years, and it stands for 12 years. Hence, you can't refer that a children/a baby is "年纪轻轻", as it doesn't reach a 纪. (Of course, this boundary has been rather obscure these days)
ref:http://www.zdic.net/z/21/js/7EAA.htm
数: This means "the count". It is rather neutral. Also, it can be used to describe the age of animals or plants or architectures. When it is referring to human ages, in most of the cases, it is used the same way as "年纪". e.g. "上了岁数" = "上了年纪". Although we hardly say "岁数轻", as the "count" can't be "light".
Please note these words are quite formal. When we talk about ages in casual communication, it is more common to use "岁" directly, such as "几岁了" "多少岁啊" instead of "多大岁数/年纪/年龄", which sounds like you are referring to someone more senior than you.
To make it even more casual, we can simply ask "多大了".