The sacrifice of Aqīqah is a confirmed Sunnah (Sunnah Muʾakkadah) and obligatory according several scholars. It is the slaughter of a sheep to show gratitude for being blessed with progeny. Ideally the sheep is slaughtered on the 7thday after the birth of the child, if one cannot slaughter on that day, one may slaughter also before or after. So Muhammad (peace be upon him) said the following:
„A baby is being pledged for his aqiqah, sacrifice is made for him on the seventh day, his head is shaved, and a name is given to him.“
(Sunan Ibn Māǧa)
Pledge means here, that the servant who was gifted a child by Allāh, shows his gratitude for Allāhs mercy with a consideration through commitment and sacrifice of his assets. For a baby boy two sheep are slaughtered, while one sheep is slaughtered for a baby girl.
This becomes apparent in the following tradition, where Muhammad (peace be upon him) said:
„For the (newborn) boy, two equal sheep are to be sacrificed and one sheep for the baby girl and it does no harm, whether the sheep are male or female.“
(Sunan at-Tirmiḏī, Ibn Māǧa, an-Nasāʾī und Musnad Aḥmad)
The varying number of sheep does not have a valuable function, however the wisdom of this distribution is shown in the inheritance regulations of Islam. Therefore, who wishes can also sacrifice two sheep for a baby girl.