Unifying Two Methods of Measuring Quantum Contextuality