I think gane26 is confused about the header's connection which is of 10 pins.
@gane26 yes you are right that you will need only 7 pins to connect it to mcu,but the rest is NC (no contact) or may be for LED some key pads consists of back light and buzzer also.It will depend on which kind of keypad you are using checkout the datasheet of your the keypad.
If you don't have any datasheet then using a multimeter (diode test function) you can find out the connection.
Good Luck