Arcana Coelestia#2850
2850. 'And like the sand which is on the seashore' means a whole multitude of correspondent facts. This is clear from the meaning of 'the sea' as facts in general or a gathering together of them, dealt with in 28, 2120, and from the meaning of 'the sand' as facts individually and separately. Facts are compared to 'the sand' because in the internal sense the particles of stone from which the sand is formed mean facts, 643, 1298. Both comparisons are made here - that they will be multiplied 'as the stars of the heavens' and 'as the sand on the seashore 'because 'stars', or cognitions, are related to the rational, whereas 'the sand of the seashore', or facts, are related to the natural. When the things that belong to the rational man, namely the goods and truths present in cognitions, so exist in accordance with the things that belong to the natural man, that is to say, with facts, that they make one or mutually support each other, they in that case correspond. The Lord brings man's rational concepts and his natural images into this state of correspondence when He regenerates him, that is, makes him spiritual. It is for this reason that both the stars of the heavens and the sand on the seashore are mentioned here. Otherwise one phrase would have been sufficient.
Arcana Coelestia#2119
2119. The fact that the final phase of each person's life when he dies is his last judgement is no secret to some people; yet few believe it. It is for ever true however that after death everyone rises again into the next life and appears for judgement. But that judgement takes place as follows: As soon as a person's physical body grows cold, which occurs after several days, the Lord raises him up by means of the celestial angels who are present with him at first. If however he is such that he cannot remain with them, spiritual angels take over, and gradually after that good spirits. For no matter how many people enter the next life, they are all received and welcomed as guests. But because the desires of someone who has been leading an evil life follow after him he is unable to stay long with angels or good spirits, but he gradually separates himself from them until at length he comes to spirits whose life is similar to and in keeping with his own in the world. At that point it seems to him as though he were back in the life of the body; indeed it is in itself a continuation of that life. With this life his judgement begins. Those who have led an evil life go down after some delay into hell, while those who have led a good life are gradually raised up by the Lord into heaven. Such is the last judgement of each person, as has been told from experience in Volume One.