The keypad on the PCA20018 board has 39 buttons.
The keyboard matrix is five rows by eight columns, providing 40 available buttons for firmware. Thirty-nine are used by the keypad with one unused. The matrix is connected directly to the nRF51 device on the board. See Keypad matrix.