Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: We were with Sayyiduna Umar (may Allah be pleased with him), discussing (the case of) someone who forgets in his prayer and does not even remember how many (rak'ahs) he has prayed. Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: I said: I have not heard anything about this from the Messenger of Allah (peace and blessings be upon him). Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: While we were sitting like this, Abdur Rahman bin Awf (may Allah be pleased with him) suddenly arrived and said: What matter are you (troubled) about? We said: A man forgets in his prayer and does not know how many rak'ahs he has prayed. Abdur Rahman bin Awf (may Allah be pleased with him) said: I heard the Messenger of Allah (peace and blessings be upon him) say: "When a man forgets in his prayer and does not know whether he has prayed two, three or four rak'ahs, let him place the forgetfulness on the side of excess and perform two prostrations."
Muhammad bin Ishaq said: I met Husayn bin Abdullah and discussed this hadith with him. He said to me: Did he (Makhul) narrate it with a connected chain? I said: No. He said: But Makhul narrated it to me from Kurayb, from Ibn Abbas, from Abdur Rahman bin Awf, from the Prophet (peace and blessings be upon him), in the same way as this hadith.
Al-Muharibi narrated it from Muhammad bin Ishaq with the meaning of Ibn Ulayyah's narration. So the connection of the hadith rests on Husayn bin Abdullah, and he is da'if (weak), except that it has a supporting narration from the hadith of Makhul.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3805