Is there more reward if the congregation is greater?
Yes, the reward for naafil and obligatory prayers is greater if the number of worshippers is greater.
It was narrated that Ubayy ibn Ka’b said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “A man’s prayer with one other man is better than his praying alone, and a man’s prayer with two other men is better than his praying with one other. The more there are the more beloved that is to Allaah.” Narrated by Abu Dawood, 554; al-Nasaa’i, 834. Classed as saheeh by al-Albaani in Saheeh Abi Dawood.
Al-Bazzaar and al-Tabaraani narrated that the Prophet (peace and blessings of Allaah be upon him) said: “The prayer of two men, one of them leading the other, is better before Allaah than the prayer of eight praying separately, and the prayer of four men, one of them leading the others, is better before Allaah than the prayer of one hundred praying separately.” Classed as hasan by al-Albaani in Saheeh al-Targheeb, 412.
“Better” here means greater in reward.
“The more there are” means the greater they are in number; that is better than if there are fewer.
Shaykh al-Islam Ibn Taymiyah said in Majmoo’ al-Fataawa, 31/221:
It is better for the people to be gathered in one mosque than scattered between two mosques, because the greater the congregation, the better… then he quoted this hadeeth as evidence.
Shaykh Ibn ‘Uthaymeen said:
If we assume that there are two mosques, one of which has a larger congregation than the other, it is better to go to the one which has the larger congregation, because the Prophet (peace and blessings of Allaah be upon him) said: “A man’s prayer with one other man is better than his praying alone, and a man’s prayer with two other men is better than his praying with one other. The more there are the more beloved that is to Allaah.” This is general in meaning. So if there are two mosques and one has a larger congregation than the other, then it is better to pray in the one that has the larger congregation.
Al-Sharh al-Mumti’, 4/150, 151.
Some of the scholars are of the view that congregations do not vary in virtue or reward, because of the hadeeth of Ibn ‘Umar (may Allaah be pleased with him), which says that the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Praying in congregation is twenty-seven times better than praying alone.” Agreed upon. So any congregation is twenty-seven times better and no differentiation is made between one congregation and another.
But this argument was refuted by the following.
Waliy al-Deen al-‘Iraaqi said:
The hadeeth does not offer any evidence for those who take it to mean that all congregations are equal, because we say that the least that you will gain is the multiple reward mentioned; that does not mean that the reward may not also be multiplied further for another reason such as the size of the congregation, the honoured status of the mosque, travelling a long way to the mosque and so on.
Tarh al-Tathreeb, 2/301, 302.
This means that if the congregation consists of two or more, the multiple reward mentioned in the hadeeth (twenty-seven times) will be attained. That does not mean that the reward may not be increased for other reasons as well, such as the size of the congregation.
And Allaah knows best.