What is the total number of people killed on the 2 Death Stars when they exploded?
The Death Star Technical Companion by West End Games lists the first Death Star specs as follows:
The first Death Star is depicted in various sources of having a crew of:
265,675, as well as 52,276 gunners, 607,360 troops, 30,984 stormtroopers, 42,782 ship support staff, and 180,216 pilots and support crew.
Its hangars contain assault shuttles, blastboats, Strike cruisers, land vehicles, support ships, and 7,293 TIE fighters. It is also protected by 10,000 turbolaser batteries, 2,600 ion cannons, and at least 768 tractor beam projectors.
Crew (485,560), Gunners (152,275), Troops (1,295,950), Infantry (127,570), Technical personnel (75,860), Pilots (334,432)
According to this link (which cites canon sources): The crew of the second Death Star is 485,560.
This link (which may not be canon) puts the crew of the first DS at 322,951
And if I'm reading this correctly: The Death Star Technical Companion (PDF) states the crew is 265,675 AND puts the passengers at 607,360!
And to complicate matters even more: I believe in one of the books, someone asks Luke how may people he killed on the first DS and he said about 1 million. Obviously, he felt very guilty about that.
So, the Death Star Technical Companion, if accurate, is more in line with Luke's statement that he killed about a million people! (Assuming everyone was on board)
Therefore, (assuming they were all on board) we're looking at anywhere from approximately 1.3 to almost 1.5 million people killed (at the very least).
TL;DR: We don't know for sure.
According to the new canon novel Star Wars: Bloodline, the total for both Death Stars was roughly 1.5 million people killed; according to the new canon novel Star Wars: Lost Stars, the destruction of the first Death Star alone killed somewhere between "nearly a million and "nearly two million" people.
“Don’t misunderstand me. Obviously the Rebellion was right to oppose Palpatine. Something had to be done. But if you ask me, that hardly condones the terrorist tactics of the Rebel Alliance.”
Casterfo stopped mid-pace; the two of them now stood in the heart of one of the long, dark tunnels, the wind rippling their robes and chilling Leia to the bone. He said, “Destroying the Death Stars, for a death toll of nearly one and a half million people, the vast majority of whom were low-level Imperial officers or even civilian workers?"
-Star Wars: Bloodline
This figure comes from an apologist for the Empire, and seems fairly reliable.
In another canon novel, Star Wars: Lost Stars, Thane Kyrell, an actual member of the Imperial Navy gives a slightly higher figure:
Obviously, the Rebel Alliance was no better; it had blown up the Death Star with nearly two million people on board.
- Star Wars: Lost Stars
But his friend Ciena Ree, also an Imperial soldier, provides a different number:
“And nearly a million aboard the Death Star.” Ciena refused to ignore Jude’s death. She still had nightmares of running through the station’s corridors, screaming for Jude to get on a shuttlecraft, but never finding her friend.
- Star Wars: Lost Stars