And I saw the souls of those who had been beheaded because of their testimony about Jesus and because of the word of God. They had not worshiped the beast or its image and had not received its mark on their foreheads or their hands. They came to life and reigned with Christ a thousand years. (The rest of the dead did not come to life until the thousand years were ended.) This is the first resurrection. Blessed and holy are those who share in the first resurrection. The second death has no power over them, but they will be priests of God and of Christ and will reign with him for a thousand years (Revelation 20:4-6).
Will there be one resurrection or two or more? This passage suggest that there is at least two. We might say three, because Jesus was raised first independent of these two. If we consider a pre-Tribulational rapture (1 Thessalonians 4:13-18) a separate event, then there is four. Why then does Revelation 20:5 speak of "the first resurrection"? I think, as other commentators have suggested, it is because John wants to set the resurrection of the righteous in contrast to the later resurrection of the wicked. Therefore, "first" in this context does not signify a counting of all resurrections but rather an ordering of certain resurrections, namely, the resurrection of the righteous vs. the resurrection of the wicked. In othe words believers are raised to life before unbelievers are raised to death.
This interpretation is supported in the present context by the description of the two resurrections. The first resurrection is connected with those that reign with Christ in the Millennium. Those participating in this resurrection are called "blessed and holy" and "the second death has no powe over them" and "they will be priests of God and of Christ and will reign with him for a thousand years." Clearly, this resurrection is only of the righteous.
In contrast, the text speaks of "the rest of the dead", who will be raised after the thousand years. Since the very next occasion with respect to the raising of the dead is in Revelation 20:11-15, this passage is likely the antecedent to "the rest of the dead." And there we find that these dead rise to be judged and to be thrown into the lake of fire. In the context, as the first resurrection was for the righteous believers. This resurrection is for the unirighteous unbelievers, whose names are not written in the Book of Life.
There are other Scriptures that teach these two resurrections:
Do not be amazed at this, for a time is coming when all who are in their graves will hear his voice and come out—those who have done what is good will rise to live(i.e. first resurrection; cf. Luke 14:14), and those who have done what is evil will rise (i.e. second resurrection) to be condemned (John 5:28-29).
and I have the same hope in God as these men themselves have, that there will be a resurrection of both the righteous (cf. Luke 14:14) and the wicked (Acts 24:15).
Therefore, let us understand that there are two kinds of resurrections, one kind for the righteous and one kind for the wicked. Let us also understand that the righteous will be raised before the wicked. The former will be raised to live and the latter will be raised to be condemned. What is more, there may be multiple resurrections of the righteous (e.g. Christ, the rapture, the Tribulation saints) though we know of only one final resurrection of the wicked (i.e. Great White Throne Judgment of Revelation 20:11-15).