They land in the ship and see Rory lying a platform with Brian nearby. Amy wakes them with some alien smelling salts. An energy weapon fires over their heads. As Amy drags Rory and Brian to safety, the Doctor looks up and sees their attacker. It looks like a geriatric Borg with a pair of earbuds embedded in his face. "So many of them," he says, "crawling the planet, seeping into every corner." His image flickers, disappears, then reappears in front of a series of hexagonal computer screens. The Doctor studies him more closely. "It's not possible," he whispers. Long story short: The guy is a member of the Shakri, a people the Doctor had heretofore believed were a myth, and there's something significant about the number seven but nobody says exactly what. The Shakri says they are "serving the word of the Tally," which is just a mystical way of saying they're in the field of pest control and humans are the pests. They're culling the human population before they can venture further out into space. Amy and Rory return to help out and ask more questions about the Tally. "Before the Closure, there is the Tally," says their host. "The Shakri serves the Tally!" The Doctor tries to make a case for humanity that sounds kind of inspirational, but not entirely convincing. The Shakri laughs. "The Tally must be met! The second wave will be released." They're going to drop a bunch of dodecahedra on the planet or some crap like that.
The Shakri flickers and disappears because he was really just a hologram all along. The Doctor sonics the Shakri computer and turns all the cubes into little defibrillators to restart the dead people's hearts. A third of the population comes back to life. The other two-thirds drop dead from being shocked unnecessarily. Actually, they don't, as far as we see, but the energy feedback causes the Shakri ship to overload. "Run!" the Doctor says to his companions. They leap back through the portal just before the ship explodes. Everybody is saved! Except for all those people on the marble platforms who were left behind on the ship. What were they doing there in the first place? Who knows?
Once again on Earth, the Doctor gets heartfelt thanks from Kate. "You really are as remarkable as Dad said," she says and gives him a kiss on the cheek. He then drops in on Brian, Rory and Amy for dinner, but soon excuses himself so he can go on the next adventure. He doesn't invite Amy and Rory, explaining that he understand he can't give up their regular lives. "Actually, it's you they can't give up," Brian says. "And I don't think they should." He encourages the kiddies to go with the Doctor, because, really, how many chances do you get to save a bunch of other worlds? "Just bring them back safe," he says.