This is something that is hard for a lot of people to understand and causes them to either completely question or blindly, completely hold to the historicity and [f]actuality ( my made-up word

) of the Bible - especially in a very literal sense.
The simple truth is that, to most of the people who wrote the Bible and to those to whom most of it was actually written, the truth of the story or the recounting of the story did not lie in properly, completely, and sequentially conveying the facts of the story but rather in in properly conveying the meaning or point of the story.
Genealogies are a great example. To us, if a genealogy says that Aaron was 38 years old when he begat Ephraim, Ephraim was 35 years old when he begat David, David was 45 years old when he begat Seth, and that Seth was 42 years old when he begat Benjamin then we will conclude a couple of "facts" from that genealogy:
- There are five generations represented from Aaron to Benjamin, and
- There are 160 years from Aaron's birth to Benjamin's birth.
However, to the ancient Jew that genealogy could have represented five or six - or perhaps 10 or even 50 - generations and the time from Aaron's birth to Benjamin's birth could have been anywhere from 160 years to 260 years or even 2060 years.
In fact, it was very common to leave people out entirely in Jewish genealogies. If someone had disgraced their family, they would often be left out. If a genealogy was to span a significant amount of time then many people would often be left out - leaving only the "highlights", if you will - of the family line. A man's age at "begatting" time in a genealogy would have been his age when he gave birth to his firstborn (more on that in a second), whether the name that followed was his firstborn son or his grandson or his great, great, great grandson. The point of Jewish genealogies wasn't intended to accurately represent a specific number of generations or even a specific number of years - especially when those years are represented with large, round numbers such as 40, 100, 400, 1000, 4000, etc. or with important numbers like 6, 7, 12, 70, 77, 120, 666, 777, etc. Instead, the point of Jewish genealogies was simply to establish a family heritage, in order to point back to certain aspects or individuals in a person's lineage.
Even something as seemingly clear as describing a person's firstborn child isn't necessarily clear at all. If a man begat his "firstborn" at age 46 then it was possible that he actually bore other children prior to age 46 - especially if those children were female but sometimes even if they were male. If a man's first two children were female and last four children were male then the first son born would be listed as the "firstborn" - since he is the firstborn son and carries the applicable family heritage and inheritance - and the two older daughters would usually be listed either following the eldest son or after all of the sons.
This doesn't make much sense to us, using "Western" logic, but it did to them.
Another pitfall lies in the assumption of a sequential retelling of events. If a story says that John got up this morning, then prepared some coffee and eggs, then ate breakfast, then read the newspaper, and then went to the bathroom then we take that as necessarily a sequential retelling of those events. To the ancient Jew, the order of events doesn't have to actually correlate with their occurrence in time in order for it to be a "factual" retelling. If rearranging the order of the events in the retelling of the story better conveys the point of the story - or simply makes for better reading - then they would rearrange the order of the events.
Oh, and footnotes for these types of things weren't required - so it's very difficult, if not impossible, to tell for certain whether a given passage in the Bible can truly be taken "literally" in regards to the passage of time or the order of events.
The 77 generations (or 4000 years) from Adam to Jesus represented in the Bible could have been 77 generations or it could have been 842 generations covering 42,000 years and it would have made no factual difference to the average Jew to whom the Gospel of Luke was written. Actually, by the obvious use of the number 77, most Jews reading it would have most likely assumed that the number was NOT a literal number - since the number 77 means perfect upon perfect, or complete upon complete. This correlates very well with Galatians 4:4, which states that Jesus was born "at the fullness of time" - or at the completed time or even the perfect time.
The vast majority of the Bible, when it was written, was never intended to be taken literally - not as we think of literally, anyway.
And then you've got the whole thing where people want to treat the Bible - and New Testament, especially - as a How-To book when most of it was written telling the people what they were doing wrong, not what they were doing right.