How many sons did Abraham have?
Regarding Genesis 20, where it says Sarah was untouched. So being the wife of Abraham she had no relations with him? Then how was it written she was barren? Abraham was married to his half-sister so he only told half a lie to the Pharaoh. Why was the Pharaoh plagued when this was the free will of Abraham imposed on the Pharaoh?
The firstborn son to Abraham by his wife, Hagar, was Ishmael, so they did have relations? His first noted son was Ishmael? Wife/Hagar plus Husband/Abraham equal son Ishmael? Did they have more children? Then half-sister/wife Sarah plus half brother/husband Abraham had a son Isaac who is the younger brother to Ishmael. So same father different mothers?
Sarah was untouched by Abimelech. "But Abimelech had not come near her; and he said, "Lord, will You slay a righteous nation also? Did he not say to me, 'She is my sister'? And she, even she herself said, 'He is my brother.' In the integrity of my heart and innocence of my hands I have done this." (Genesis 20:4-5). This does not mean she did not have sexual relations with her husband Abraham. God intervened with Abimelech to keep an innocent man from committing a sin. "And God said to him in a dream, "Yes, I know that you did this in the integrity of your heart. For I also withheld you from sinning against Me; therefore I did not let you touch her" " (Genesis 20:6).
Abraham had lied to both Pharaoh in Genesis 12 and to Abimelech in Genesis 20. We are informed of these incidences to understand that even a man of great faith had his weakness and sinned.
Hagar was Sarah's handmaid. The practice was that if a woman was unable to have children, her husband could marry her handmaid, making her a concubine. Children born to the handmaid were counted as the wife's children. "So she said, "Here is my maid Bilhah; go in to her, and she will bear a child on my knees, that I also may have children by her." Then she gave him Bilhah her maid as wife, and Jacob went in to her" (Genesis 30:3-4).
In the case of Abraham and Hagar, Ishmael was their only child. Abraham did marry another woman, Keturah, after Sarah died and had six sons by her (Genesis 25:1-2).
Isaac was Abraham's second son, but he was the son that God had promised. God told Abraham to send Ishmael away. "Therefore she said to Abraham, "Cast out this bondwoman and her son; for the son of this bondwoman shall not be heir with my son, namely with Isaac." And the matter was very displeasing in Abraham's sight because of his son. But God said to Abraham, "Do not let it be displeasing in your sight because of the lad or because of your bondwoman. Whatever Sarah has said to you, listen to her voice; for in Isaac your seed shall be called. Yet I will also make a nation of the son of the bondwoman, because he is your seed." So Abraham rose early in the morning, and took bread and a skin of water; and putting it on her shoulder, he gave it and the boy to Hagar, and sent her away. Then she departed and wandered in the Wilderness of Beersheba" (Genesis 21:10-14). Abraham also did not allow the sons of Keturah to inherit from him either. "And Abraham gave all that he had to Isaac. But Abraham gave gifts to the sons of the concubines which Abraham had; and while he was still living he sent them eastward, away from Isaac his son, to the country of the east" (Genesis 25:5-6).