What is the maximum number of blocks in a blockchain?
Vijesh's answer is correct at the blockchain level. Within smart contracts, block numbers are represented as a 256-bit unsigned integer, so the maximum block number is 115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,935. This would take 3,671,743,063,080,802,746,815,416,825,491,118,336,290,905,145,409,708,398,004,109,081,935,347 years to reach at 15 second block times.
This is unlikely to be a problem in practice.