We don't know
Valorum's answer covers the movies; I will try to answer for the books. Oliphaunts appear twice, once in a skirmish and once in a major battle.
The first is when an oliphaunt escapes from Faramir's ambush of the Southrons in Ithilien. It is quite possible that there was more than one oliphaunt in the battle, but we are only told about this one. We are not told the fate of this oliphaunt, it appears that it is not killed in the battle but may not have lived much longer.
On the great beast thundered, blundering in blind wrath through pool and thicket. Arrows skipped and snapped harmlessly about the triple hide of his flanks. Men of both sides fled before him, but many he overtook and crushed to the ground. Soon he was lost to view, still trumpeting and stamping far away. What became of him Sam never heard: whether he escaped to roam the wild for a time, until he perished far from his home or was trapped in some deep pit; or whether he raged on until he plunged in the Great River and was swallowed up.
The Lord of the Rings Book Four, Chapter 4: Of Herbs and Stewed Rabbit
Page 661-2 (Houghton Mifflin Harcourt; Single Volume 50th Anniversary Edition)
The second appearance of oliphaunts (this time refered to as Mûmakil) is in the Battle of the Pelennor Fields. We are not told how many are present (although it must have been more than one - Mûmakil is a plural word), and we not told if any were killed.
We do know that the horses of the Rohirrim avoided them.
Not too soon came their aid to the Rohirrim; for fortune had turned against Éomer, and his fury had betrayed him. The great wrath of his onset had utterly overthrown the front of his enemies, and great wedges of his Riders had passed clear through the ranks of the Southrons, discomfiting their horsemen and riding their footmen to ruin. But wherever the mûmakil came there the horses would not go, but blenched and swerved away; and the great monsters were unfought, and stood like towers of defence, and the Haradrim rallied about them.
The Lord of the Rings Book Five, Chapter 6: The Battle of the Pelennor Fields
Page 846 (Houghton Mifflin Harcourt; Single Volume 50th Anniversary Edition)
We do know that the men of Gondor attacked the oliphaunts on foot, but we don't know if they had any success.
But many others were hurt or maimed or dead upon the field. The axes hewed Forlong as he fought alone and unhorsed; and both Duilin of Morthond and his brother were trampled to death when they assailed the mûmakil, leading their bowmen close to shoot at the eyes of the monsters.
The Lord of the Rings Book Five, Chapter 6: The Battle of the Pelennor Fields
Page 849 (Houghton Mifflin Harcourt; Single Volume 50th Anniversary Edition)
And that's it.
- Number of oliphaunts who appear in battle: unknown, at least three and probably many more.
- Number of oliphaunts killed in battle: unknown, could be as low as zero.