M56? Are you sure? I thought your car had the M54.
And,yes, the M54 has 2. One on the throttle body and one on the gas pedal.
The gas pedal has a potentiemoter (of sorts) that detects the position of your foot. The throttle body has a stepper motor that open according to the detected position of your foot.
If your foot presses down 10 "clicks" then the throttle motor opens 10 clicks. (There can be math involved to more finely regulate the position of the motor, but the idea remains the same even if the description is grossly oversimplified.)
What symptoms are you having that makes you ask about throttle sensors? If there is a code, it should define which of the sensors is the object of your desire. Knowing the object of your desire narrows the field of possible locations for it to be.