All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The method of saying Takbeer (Allaahu Akbar) in ‘Eed prayers is that a praying person should say Allaahu Akbar seven times in the first Rak'ah after saying the Takbeeratul-Ihraam (the Takbeer for initiating the prayer). In the second Rak'ah, he should say Allaahu Akbar five times after saying Allaahu Akbar when standing from the first to the second Rak'ah –which is called the transitional Takbeer).
For more benefit, please refer to Fataawa 89140 and 86979.
Saying that the reason of these Takbeer is due to the death of Al-Qaasim, the son of the Prophet –whom he had from Khadeejah is not correct. All the books of biography reported that the Prophet’s son died as a child in Makkah before he was commissioned as a Prophet.
Allaah Knows best.