On the number of wavelengths and switches in all-optical networks