The gas content of peculiar galaxies: counterrotators and polar rings