The Prophet ﷺ led us in the prayer of fear. He prayed two units with some of his companions and then gave the closing salutation. They withdrew, and another group came and took their place, and he prayed two units with them and gave the closing salutation. So the Prophet ﷺ performed four units, while each group performed two.
حدثنا روح حدثنا أشعث عن الحسن
صلى بنا النبي ﷺ صلاة الخوف فصلى ببعض أصحابه ركعتين ثم سلم فتأخروا وجاء آخرون فكانوا في مكانهم فصلى بهم ركعتين ثم سلم فصار للنبي ﷺ أربع ركعات وللقوم ركعتان ركعتان