BeagleBone has two expansion headers at both edges with 46 pins each. If you look carefully, you can see that headers are marked as
P9 and pins
46 are marked on the board. Not all extension pins are GPIOs. Some pins are reserved to deal with analog components. Some pins are power and ground pins. BeagleBone SRM and Schematic diagram give details of which extension pin is connected to which of the processor pin. Many sensors/components require an external power supply to operate. Power supply can be given to these sensors via power and ground pins. BeagleBone provides both 3.3 volts and 5 volts pins to power up sensors with that voltage level.
The AM335X processor has four banks of 32 GPIO pins each. Not all ...