keypad - number of connecting pins are 14

we only use the first 7 pins of the keypad to read the keys

for what purpose are the rest pins used for

refer to
http://playground.arduino.cc/Code/Keypad

To quote that page:

Next, you are going to use your Ohm meter to find out which pins are connected to which keys. The first thing to do is count how many pins are on your keypad (as seen in the photo below.) The photo is showing 14 pins though not all of the pins are used. Don't worry, once you've completed this procedure you will know which pins are unused and can be ignored.

They are only showing one keypad by way of illustration - you can't even find out what type it is so yours
is likely to be different anyway. Having more signals on a connector that are necessary is a sign that that
style of connector is used on different kinds of keypad (some of which need more pins, perhaps for back lighting
or something).

http://playground.arduino.cc/Main/KeypadTutorial
"Once you have completely identified all the pins on the diagram then you can safely ignore any unused keypad pins. You are now ready to wire the keypad to your Arduino."

So those other 7 pins are the ones you ignore.