in Exodus 11:5 it says that every first born son in Egypt will die, does that mean if the first born is a daughter and the second born is a son, then the son would die but not the daughter even though she's really the first born? Also in Exodus 34:19, it says the first offspring of every womb belongs to me, including all the first born males of your livestock. I'm a bit confused because the first part says the first offspring, which to me implies females included, but the second part specifically talks about first born males, so what is it? Does female first born count as "first born" or in that culture only the male are counted in birthorder?
"And all the firstborn in the land of Egypt shall die, from the firstborn of Pharaoh who sits on his throne, even to the firstborn of the female servant who is behind the handmill, and all the firstborn of the animals" (Exodus 11:5).
The Hebrew word bekhor literally means the one who opens the womb. There is nothing in the meaning of the word which defines this to be male or female. Unfortunately the New International Version adds the word "son" in their translation which lead to your confusion. The New King James Version, the New American Standard, and others are more accurate in this by only saying "firstborn" when bekhor is used.
In biblical times, headship in the family was past down from generation to generation and it was known as the right of the firstborn or the blessing. That right did not always always go to the literal firstborn. Abraham had a son named Ishmael who was fourteen years older than his son Isaac. But since it was through Isaac that God's promises were to come, Abraham sent Ishmael out of his home and Isaac was considered to be Abraham's only son (Genesis 22:16). Isaac had twin boys, but even before they were born, God stated that the older would serve the younger, thus indicating that the second born son would be given the blessing and hold the position of "firstborn" in Isaac's household (Genesis 25:23). Jacob, Isaac's second born son who became the firstborn, also did not pass the blessing on to his eldest son because he committed incest. Nor were his second or third son considered because they were violent men. The right of the firstborn (the headship) was given to his fourth son, Judah (Genesis 49:1-12). In Hebrew culture, the headship typically went to the first male in the family. Inheritance issues arose when a family had no male descendants.
Because of this, "firstborn" could be used to refer to the heir of the family, the one who would head the family after his father died. In Exodus 11:5 this is not the case since the same context talked of the firstborn of the animals -- animals don't have heirs.
"All that open the womb are Mine, and every male firstborn among your livestock, whether ox or sheep" (Exodus 34:19).
In this passage, the Hebrew word zakar (male) is included with firstborn, so it is limited to only males. Other verses on this topic do the same (Exodus 13:12; 22:29).