The OP_HASH160 opcode does not actually do any checking or have any size bytes that follows it. All it does is it takes the top stack item and hashes it with RIPEMD160(SHA256()). Then it pushes that item back to the stack. It does not compare anything nor does it require that any data follows the opcode.
The number of bytes that follows the opcode is actually for an OP_PUSHDATA opcode to push the next 20 bytes onto the stack. That pushes the 20 byte hash that we want to compare to to the stack. Then the OP_EQUAL compares the top two stack items: the hash produced by OP_HASH160 and the 20 bytes that we just pushed to the stack.
I see. Prepending the number of bytes allows the OP_CODE to not be "married" with an specific value size. – John Smith – 2017-07-25T20:28:10.137
Otherwise the protocol client would have to do something like if(OP_HASH160) then push the next 20 bytes to te stack. Right? – John Smith – 2017-07-25T20:33:43.883