Genesis 25:1
How many children did Abraham have?
Genesis 25:1-2 states that Abraham took a wife named Keturah and she bare him six sons. Galatians 4:22 states that Abraham had two sons. Hebrews 11:17 refers to Isaac as his 'only begotten son.' So how many children did Abraham have?
Galatians isn't hard to deal with, since it isn't saying that Abraham only had two kids—it's just picking two out of the lot (the two most important for the context) and using them as examples. A modern concern with exhaustive details might demand the inclusion of his other children, but the biblical narrative focuses on the theological significance of Isaac and Ishmael.
Did the writer of Hebrews forget Ishmael? Hebrews is here making use of the LXX version of Genesis 22:2, with one exception: where Hebrews says 'only begotten' the LXX says 'beloved.' On the other hand, a variant tradition of the LXX, used by Aquila and Josephus, also says 'only begotten.' Both words derive from the Hebrew yahid, which can carry both meanings. This is the sense in which 'only begotten' should be understood. It is therefore not a statement of birth order or number but of prominence.
Regarding Genesis 25:1-2: Was Keturah a wife, as this verse says, or a concubine (per 1 Chr. 1:32)? The use of 'wife' is a translation artifact in English. The Hebrew word is ishshah, which means any woman and includes the meaning of 'wife'.