For my project I would like to use an Arduino Yun rev 2 but I need more Analog and Digital pins than the Arduino Uno.
Everywhere, including Arduino official page, the Yun is stated to have 12 analog pins and 20 digital pins (which would be perfect) but on the actual picture of the product there is the same pins number as for a Uno board (6 / 14)
Regarding the number of analog pins, the documentation is correct (but incomplete). Digital pins 4, 6, 8, 9, 10, and 12 are also analog pins A6-A11. So there's your 12 analog pins right there. I have reported this missing information in the documentation here:
Regarding the number of digital pins, there are actually 23 digital pins! The extra 3 pins are on the 2x3 male ICSP header. They are shown on this diagram:
There is a white dot on the board next to the corner of the ICSP header marking pin 1. The pin marked MOSI on the diagram is digital pin 16. The pin marked MISO is digital pin 14. The pin marked SCK is digital pin 15.
Regarding the discrepancy between the digital pin counts of 20 and 14, this is an inconsistency in the documentation. On these boards, the analog pins may also be used as digital pins. So 14 digital only pins + 6 digital/analog pins = 20. So the digital pin count on some boards is the number of pins which are digital only, while on others the count is the total number of pins which may be used as digital I/O. The inconsistency in the way digital pins are counted from one board to another was reported here: