Retreating is discarding the energy cost listed on the pokemon card in order to switch it with a benched pokemon. If the retreat cost is zero discarding zero energy cards to bench it and bring up a new pokemon still counts as retreating. The only real exception is when Balloon Berry is used. In that case you're discarding the berry instead of energy, but it's still retreating.