This topic is a bit controversial, with different sources arguing over how many children the Prophet had. The problem appears to stem from the fact that Muhammad, peace be upon him, married several women who had children from previous marriages. This has led to debates around whether certain children were children of the Prophet or children from previous marriages.
What we do know for certain is that the Prophet Muhammad lost two young sons and that most, if not all, of his children came from his first wife Khadijah bint Khuwaylid. Many Shia Muslims believe that the first 3 of Khadijah’s daughters were in-fact from a previous marriage, or that they were actually the daughters of Khadijah’s sister, Hala, who had strained relations with her husband and eventually died.
Regardless, we know that Fatima was Muhammad’s daughter and viewed by many as his favorite. She was a fierce and devote Muslim and actively took part in spreading Islam and supporting her father. Fatimah was known for being strong-willed and made numerous important political decisions through-out the course of her life. She died only 6 short months after Muhammad himself passed away. Interestingly, the Prophet Muhammad, peace be upon him, know that Fatimah would be the next of his family to join him in the afterlife.
Muhammad also had two sons with Khadijah, Qasim ibn Muhammad and Abd-Allah, but unfortunately both of these sons died while they were still young. Muhammad, who was well-known for caring deeply for children, was greatly shaken by their deaths but trusted in the will of Allah. Muhammad also had another son with his wife Maria al-Qibtiyya named Ibrahim ibn Muhammad, though this son also died young.
As mentioned, Muhammad is believed to have also had three other daughters with Khadijah, Zainab, Umm Kulthum and Ruqayyah. Scholars debate whether these three women were the Prophet’s biological children or whether he had in-fact adopted them. Muhammad was known for caring deeply for other people and over the course of his life adopted orphans, married widows, and otherwise insured that the most disadvantaged people were taken care of.
Regardless of how many children the Prophet Muhammad had, it is a well-known and recorded fact that he cared deeply for all children and demanded that they be respected. Muhammad was one of the fiercest advocates for ensuring the well-being of children and was known for doting upon and playing with the small children among his followers.
This trait would be one of the many traits that drew people to Muhammad. He was known to be a caring man who would take care of those in need and stand up for the respect and rights of disadvantaged people. His compassion would go a long way in forming the cultural aspects of Islamic family life which encourages devotion and caring for one’s family. Muhammad the Prophet, peace be upon him, was a man who lead by example, and this example helped shape a caring and tolerant Islamic society that has prospered centuries after his death.