Knew in what sense Ricky?
Will God not judge them according to theircwords, every idle word, and their actions or lack thereof?

So how does God keep a record of those He does not know?

You may want to check your choice in definition of know, and see it’s very limited scope in view of God, eternity, and He entire purpose/plan.