The Bible specifically states in Daniel chapter two that the vision of the image was given to Nebuchadnezzar in his second year. And Daniel pointedly told Nebuchadnezzar "YOU YOURSELF are the head of gold". (Daniel 2:37,38 and Daniel 5:18-22 support that this applied only to Nebuchadnezzar and not to Belshazzar or the empire of Babylon in general) However, the vision of the four beasts was given to Daniel in Belshazzar's first year, many years after Nebucadnezzar had died, and was a prophecy of things yet to come.
Looking more carefully at Daniel chapter two yields some important clues also. In Daniel 2:45 there is revealing detail. When Daniel is enumerating the parts of the image, he makes what at first might seem to be an error in his sequencing of the elements of the image when he says: "whereas, you beheld the iron, the bronze, the clay, the silver, and the gold…" when actually, he should have said , "whereas, you beheld the clay, the iron, the bronze, the silver, and the gold…". Daniel here deliberately separates the iron from the clay by putting the copper (bronze) in-between. Had the iron and clay only been a single entity or kingdom he would, should, and could not have done so. But by his separating these two elements, the iron and clay, he lays down a clue to help us see that there are in fact five kingdoms, not four.
Another clue is in verses 32 and 33. Notice that the gold, silver, bronze, iron, and the iron-clay mix are each introduced separately.
There are, in fact, five kingdoms in the Image, not four, and the first Beast of Daniel chapter 7 does not match up with Babylon, but with Medo-Persia. Certainly Belshazzar, the actual ruler of Babylon at the time of Daniel's vision, did not receive the heart of a man (Daniel 7:4). But Both Darius and Cyrus did; Darius the Mede, and Cyrus the Persian, hence the Medo-Persian empire. (a quick read of Ezra chapter 1 and Daniel chapter 6 will confirm this, pay particular attention to Ezra 1:2-5 & Daniel 6:18-20; Cyrus was strongly committed to the rebuilding of the Temple, and Darius was deeply compassionate towards Daniel, thus: "A Heart of a Man").
The Second Beast would be Greece, which did consume "Much Flesh" under Alexander the Great, and the Third Beast would be Rome, the Four Heads of which would picture its Four Distinct Governmental eras, i.e. Monarchy, Republic, Empire, and The "Renovatio Imperii" (or the 'Restoration of Empire' phase, which included a complete rewriting of law, thus a fourth Governmental iteration).
Note too: the descriptions of the Beasts in Daniel Chapter 7 describe their Active Natures during their dominant Phase, not their Historical effects or Legacies; so, although for example, Greece, after Alexander, did divide into four separate Kingdoms, it did not have a Four-Headed Nature: it became or fragmented into four separate Kingdoms or Realms. And in fact, they did not all continue to be Greece. So the four Heads of the Third Beast would represent the Four Distinct Governmental epochs or 'heads' of the Roman Empire, or the overall Nature of that "Beast". It's an easy mistake to think that the four heads of the Third Beast identify it as Greece, but the 'Active Nature' of Greece under Alexander the Great was not four-headed, it became Four separate realms when it broke apart, it itself was not four-headed when it was Greece per se. And as for the 'three ribs' in the Bear's (Greece's) mouth, (Daniel 7:5) it is very easy to make a case for trifurcated (three pronged) realms/campaigns of conquests for Alexander the Great, i.e. Egypt, Asia minor, & India. It is also trifurcated geographically: Africa (Egypt), Asia minor, and the Indian subcontinent. The scripture (Daniel 7:5) also mentions that the Bear
was 'raised up on one side'. Compare that with Alexander's physical posture. Interesting, no? Just give it a Thunk or two.
Remember too please, that the vision of the beasts was given to Daniel in Belshazzar's first year, and was describing future events. Daniel 7:17 tells us: “These huge beasts, four in number, are four kings who will stand up from the earth“. So the four Beasts of Daniel's vision (chapter 7) match up to the last four of the five kingdoms of the image in Nebuchadnezzar's dream (chapter 2).
So, what is the key to cracking the Bible code? Very simply, there are five kingdoms in the image of chapter 2, not four, and the first beast of Daniel chapter 7 starts with the second kingdom of the image of chapter 2. And the vision of the image does not end with Rome and the vision of the beasts does not end with Rome, but they both end with the Soviet Union
in it's past form, and soon-to-be reformulation. A revived Soviet Union, or put another way, a "Soviet Reunion"
But then, that's another story.