Herod reigned until his death in 4BC. Upon Herod's death, his kingdom was split among his sons. In 6AD, Herod Archelaus(one of King Herod's sons) was deposed and his land thus fell into Roman control. One of Archelaus's replacement was a man by the name Coponius. At the same time as the appointment of Coponius, Publius Sulpicius Quirinius was appointed governor of Syria in 6AD. Upon the appointment of Quirinius, since this was the first time the land was under Roman control, it was decreed by Caesar Agustus that there should be a census. This census was the first Roman census of the area.
"Now when Jesus was born in Bethlehem of Judaea in the days of Herod the king, behold, there came wise men from the east to Jerusalem, Saying, Where is he that is born King of the Jews? for we have seen his star in the east, and are come to worship him."-Matthew 2:1-2
"And when they were departed, behold, the angel of the Lord appeareth to Joseph in a dream, saying, Arise, and take the young child and his mother, and flee into Egypt, and be thou there until I bring thee word: for Herod will seek the young child to destroy him. When he arose, he took the young child and his mother by night, and departed into Egypt: And was there until the death of Herod: that it might be fulfilled which was spoken of the Lord by the prophet, saying, Out of Egypt have I called my son."- Matthew 2:13-15
"And it came to pass in those days, that there went out a decree from Caesar Augustus, that all the world should be taxed. ([And] this taxing was first made when Quirinius was governor of Syria.) And all went to be taxed, every one into his own city. And Joseph also went up from Galilee, out of the city of Nazareth, into Judaea, unto the city of David, which is called Bethlehem; (because he was of the house and lineage of David) To be taxed with Mary his espoused wife, being great with child." Luke 2:1-5.
Now, there is a problem. Jesus was said by one gospel to be born prior to the death of Herod the Great(4BC, but another says he was born after the census(which is a direct result of Herod's death) in 6AD. Prior to 6AD, Rome didn't even have the authority to take a census of that area.
We are left with a 10 year discrepancy between gospels. This cannot be a simple case of mistranscription, because one gospel's chronological anchor is a direct result of the other's.
The answer: it doesn't matter! The meaning matters.