What does "shy" mean here? Isn't it a word to express person's characteristics?
When we are talking about measurements (specific numbers), "shy of X" is an expression commonly used to mean "short of" or "less than." Thus, we can understand "how many years shy of" to mean "how many years short of." Ex: My little brother is just two years shy of turning 18. Ex: I called my friends just one minute shy of midnight to wish them a Happy New Year.