Ibn 'Umar reported
The Messenger of Allah (ﷺ) said two rak'ahs at Mina, and Abu Bakr after him, and 'Umar after Abu Bakr, and 'Uthman at the beginning of his caliphate; then 'Uthman observed four rak'ahs, and when Ibn 'Umar prayed with the Imam, he said four rak'ahs, but when he observed prayer alone, he said two rak'ahs.