In the GE CT-7 used in the Saab 340, the Np shaft (propellor shaft) has a set of teeth on both the forward end and the aft end. As the shaft rotates, sensors monitor the rotary motion at both ends, similar to an anti-lock braking system. As power is applied, a measureable twist, or torque is to the Np shaft and is measured by the two sensors as an out of phase difference between the front and rear teeth. This difference is proportional to torque and is expressed in percent.
In a PT-6 engine, oil pressure is measured in the propellor hub and is presented to the pilot as either a percent of maximum, or in foot-lbs of torque. I'm not sure exactly the mechanical/hydraulic workings of this system.