How to measure area height and width in pixels (rather than cm) in Photoshop CS6?

Press Ctrl+R to bring up the ruler. Then right-click the ruler and select pixels.