The Realm beyond The Door of Kingdom Hearts is The Dark Realm, hence the appearance of Heartless. Besides, it's been documented that King Mickey found The Inverse Kingdom Key in The Dark Realm, which explains why we saw him at the end. After Sora and King Mickey sealed The Door to Darkness, my guess is that Riku and King Mickey destroyed all the heartless. Didn't you see Mickey take out 2 Darksides in 1 second? My question is, what else went on in The Dark Realm? We never did get the full story.