It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "The prayer of the resident is four rak'ahs, that of the journey is two rak'ahs, and that of fear is one rak'ah."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10996