How many total digital pin outs does the Arduino Yun have
According to the official specification, it has 20 digital IO pins which can be used with digitalRead() and digitalWrite() etc.. As is typical on Arduino boards though, pins 0 and 1 also act as serial Rx and Tx (respectively).

You can program it to use them for either purpose.

The information you read might be referring to problems with uploading though. If you have something physically connected to pin 0 and/or 1, then you may have to disconnect it while you do an upload, otherwise it can interfere with the communication between your computer and the microcontroller.

If you're doing a lot of tinkering, then sometimes it's simply easier to avoid using pins 0 and 1 altogether, meaning you'd only have 18 IO pins left.