Hi there,
Arduino pin naming can be a bit confusing I'm afraid, especially because it bears bery little relation to the numbering of pins on the microcontroller (which is what you see on the schematic).
The microcontroller on the Pi Co-op is an Atmel Atmega328, and you can download its datasheet
here. In the datasheet you can see a pinout for the microcontroller, and these pin numbers are the ones that you see on the schematic. The diagram on
this page shows the pin mapping from microcontroller pins to Arduino pins. This is largely arbitrary and was chosen by the people who wrote the Arduino libraries.
When using PyMata, you would just use the Arduino pin numbers, and software further down (on the Pi Co-op) will work out how to translate the pin numbers properly. PyMata will usually be able to work out whether 2 refers to digital pin 2, or A2 by the function you're calling, or other parameters. So for example, when you called set_pin_mode, you also said that the pin was analog so it knew to use A0. If you want to use A0 as a digital input you'd need to pass in 14 as the pin. This is calculated by using the table on
this page.
Hope this is of some help, and not too confusing.
Regards
Alan