With a tape measure.
Seriously, are you asking about the motor or the boat? If the boat, measure down from where the motor sits on the transom, to the bottom. If it is 15" it is short shaft, if 20" it is long shaft. Those are the old school numbers. In reality, they would be a couple inches longer in today's boats.
If the motor, measure from where it sits on the transom to the flat cavitation plate. Expect something greater than 15" for short or greater than 20" for long. I know, these are generic measurements, but if you come up with 18", that is not greater than 20, so it would be short.