Oh, dear. This is the number of casualties, total of dead, wounded and missing on both sides.
Total deaths in battle <8,000 on both sides, though of course some later died of wounds.
That word you keep using, I don't think it means what you think it means.
Given the usual proportions of total casualties to deaths in battle, 51,000 deaths would mean nobody was still on his feet at the end of the battle.
Total deaths
http://www.army.mil/gettysburg/statistics/statistics.html
Upon further review that must in fact be approximate total casualties.
The number for total deaths seems to converge around SEVEN THOUSAND FIVE HUNDRED.
I stand corrected.
Skipped the usual Wiki source; my son the history teacher says ‘a Wiki source is an automatic F’.