How to know where number of inputs field ends in a transaction if it is not a fixedsize field? I know that we parse a transaction in bytes. So there are 2 quesions that I search for the answers of:

1- Can VarInt field -that gives the number of inputs in a transaction- be more than 2 hex digits(2 Hex = 8 bits = 1 byte)? I am asking this to be sure that it is not fixed size. We know that 2^8 = max 256 and I am pretty sure that there can be more than 256 inputs in a tx.

2- If it is not a fixed size field how do we know where number of inputs field ends or prevTx field starts?
A Varint is a Variable Length Integer, and can be up to 9 bytes in total

It is usually only one byte, which can represent numbers 0-252. 253-255 (0xFD-0xFF) are used as markers for the next three lengths.

Marker    Payload
None      1 byte of integer data
0xFD      0xFD followed by two bytes of integer data
0xFE      0xFE followed by four bytes of integer data
0xFF      0xFF followed by eight byes of integer data


Each marker indicates how to interpret the upcoming bytes.