I will try this:
Serial.print(+++);
Serial.print(ATPL);
Serial.print(x); //4,3,2,1
It may be necessary to play with delay() times, to give the XBee time to enter command mode.
It definitely will be necessary to read what the XBee is responding with, to assure, for instance, that it entered command mode, before sending it an AT command.