I can't remember anymore, but i think pin 0 and 1 HAVE to be use only for for TX and RX. Are there any more pins that are restricted in some way like this? Or is there actually only 12 GPIO (plust the 6 Analogs) that i can use.
I am also only talking about the regular Arduino UNO (and possibly the arduino Pro)
Other pins have specific purposes. Pins 3, 5, 6, 9, 10, and 11 are PWM pins. There are several timers associated with those pins. Depending on what those timers are also doing, like driving servos, some of the pins may not be available for PWM purposes.
Pin 13 has a LED and resistor associated with that. Sometimes that resistor gets in the way of using that pin as an input pin. Pins 0 and 1 also have resistors associated with them that can cause problems using them for input when they are not being used for serial.
Pins 2 and 3 are the external interrupt pins. If you have hardware generating interrupts that the Arduino needs to process, one (or both) of those pins needs to be used,
Pins 10 through 13 are the SPI pins. They are used for communication with certain external hardware, such as the ethernet shield and SD card.
Analog pins 4 and 5 are the I2C pins. Again, used for communication with some external hardware, such as RTCs.
So, you can see that there are a lot of pins that serve more than one purpose. Choosing which pins to use for what purposes is not necessarily an easy task, if the Arduino needs to communicate with specific devices.