It is narrated from Hazrat Ata bin Yasar that I asked Sayyiduna Abdullah bin Amr bin al-As and Sayyiduna Ka'b bin Ahbar (may Allah be pleased with them both) about a person who doubts in his prayer and does not remember whether he has prayed three rak'ahs or four. Both replied that he should pray one more rak'ah and then, while sitting, perform two prostrations of forgetfulness (sujood as-sahw).