I have been wondering the definition...
I mean, Are both 00123 and 12345 five-digit numbers?

If talking in context of programming languages (C/C++), no. A number with leading 0 denotes an octal number the same way that a leading 0X denotes a hexadecimal number.

So in the end, when expressed in decimal format (base 10, normal numbers), 00123 stands for 83.

If talking in context of programming languages (C/C++), no. A number with leading 0 denotes an octal number the same way that a leading 0X denotes a hexadecimal number.

So in the end, when expressed in decimal format (base 10, normal numbers), 00123 stands for 83.