<P> There were two significant cavalry engagements on July 3 . Stuart was sent to guard the Confederate left flank and was to be prepared to exploit any success the infantry might achieve on Cemetery Hill by flanking the U.S. right and hitting their trains and lines of communications . Three miles (5 km) east of Gettysburg, in what is now called "East Cavalry Field" (not shown on the accompanying map, but between the York and Hanover Roads), Stuart's forces collided with U.S. cavalry: Brig. Gen. David McMurtrie Gregg's division and Brig. Gen. Custer's brigade . A lengthy mounted battle, including hand - to - hand sabre combat, ensued . Custer's charge, leading the 1st Michigan Cavalry, blunted the attack by Wade Hampton's brigade, blocking Stuart from achieving his objectives in the U.S. rear . </P> <P> Meanwhile, after hearing news of the day's victory, Brig. Gen. Judson Kilpatrick launched a cavalry attack against the infantry positions of Longstreet's Corps southwest of Big Round Top . Brig. Gen. Elon J. Farnsworth protested against the futility of such a move, but obeyed orders . Farnsworth was killed in the attack, and his brigade suffered significant losses . </P> <P> The two armies suffered between 46,000 and 51,000 casualties . Union casualties were 23,055 (3,155 killed, 14,531 wounded, 5,369 captured or missing), while Confederate casualties are more difficult to estimate . Many authors have referred to as many as 28,000 Confederate casualties, and Busey and Martin's more recent 2005 work, Regimental Strengths and Losses at Gettysburg, documents 23,231 (4,708 killed, 12,693 wounded, 5,830 captured or missing). Nearly a third of Lee's general officers were killed, wounded, or captured . The casualties for both sides during the entire campaign were 57,225 . </P> <P> In addition to being the deadliest battle of the war in terms of total casualties, Gettysburg also had the highest number of generals killed in action of any battle in the war . The Confederacy lost generals Paul Jones Semmes, William Barksdale, William Dorsey Pender, Richard Garnett, and Lewis Armistead, as well as J. Johnston Pettigrew during the retreat after the battle . The Union lost Generals John Reynolds, Samuel K. Zook, Stephen H. Weed, and Elon J. Farnsworth, as well as Strong Vincent, who after being mortally wounded was given a deathbed promotion to brigadier general . Additional senior officer casualties included the wounding of Union Generals Dan Sickles (lost a leg), Francis C. Barlow, and Winfield Scott Hancock . For the Confederacy, Major General John Bell Hood lost the use of his left arm, while Major General Henry Heth received a shot to the head on the first day of battle (though incapacitated for the rest of the battle, he remarkably survived without long term injuries, credited in part due to his hat stuffed full of paper dispatches). Confederate Generals James Kemper and Isaac R. Trimble were severely wounded during Pickett's charge and captured during the Confederate retreat . General James J. Archer, in command of a brigade that most likely was responsible for killing Reynolds, was taken prisoner shortly after Reynolds' death . </P>

How many deaths occurred in the battle of gettysburg
find me the text answering this question