The Way of the Gun

Parker (Ryan Phillipe) and Longbaugh (Benicio del Toro) are a pair of low-level petty criminals, living off the grid and funding their existence through unconventional and often illegal means. Wanting to move past petty crime, they vow to get the proverbial 'big score.' While at a sperm donation, the pair overhear a telephone conversation detailing a $1,000,000 payment to a surrogate mother for bearing the child of gangster Hale Chidduck. Parker and Longbaugh resolve to kidnap the surrogate, Robin, but their attempt escalates into a shootout with her bodyguards, Jeffers and Obecks. The kidnappers are able to elude the bodyguards, who are arrested.
Jeffers and Obecks are bailed out and returned to Chidduck by his right-hand man Joe Sarno. As Sarno begins coordinating Robin's rescue, Longbaugh contacts her gynecologist, Dr. Allen Painter, and orders him to a truck stop to examine Robin. After the examination, Painter returns to Chidduck, and it is revealed that the doctor is Chidduck's son. It is also revealed that Jeffers and Chidduck's wife are romantically involved.
Longbaugh calls from a motel south of the Mexican border and demands a $15 million ransom. Jeffers and Obecks, tempted by the money, begin forming a plan to save the child and keep the money. As Longbaugh hangs up the telephone outside the motel, he is approached by Sarno, who offers to pay $1 million if they surrender Robin and simply walk away. Longbaugh declines the offer and returns to his room, where Parker and Robin are playing cards. Sarno then returns to Chidduck's home to plan the next step.
Jeffers comes to realize that Robin is Sarno's daughter. Jeffers, Obecks, and Painter leave to meet with the kidnappers, while Sarno departs separately with the ransom. At the motel, Parker is having second thoughts. As he confers with Longbaugh outside the motel room, Robin takes the opportunity to seize a shotgun and barricade herself inside.
As sirens are heard in the distance, Parker and Longbaugh hastily escape, and Robin emerges just as Mexican police arrive, followed by Jeffers, Obecks, and Painter. As Painter and the bodyguards try to persuade Robin to leave with them, the officers pull their guns and order everybody onto the ground. Parker and Longbaugh open fire from a nearby hilltop, and the shootout leaves the two officers dead and Obecks wounded. Jeffers shoves Painter and Robin into his car and drives off.
Parker and Longbaugh torture Obecks to learn Robin's location, while Jeffers confines Robin in a room in a Mexican brothel. Jeffers forces Painter to perform a Caesarean section to retrieve the baby, despite Robin's confession that the child is hers and Painter's and is not Chidduck's. Meanwhile, the heavily armed Parker and Longbaugh infiltrate the brothel. The ensuing gunfight, which leaves Parker wounded, turns into another standoff, until Painter shoots Jeffers. Outside, Sarno arrives with a group of men and the ransom, which they stack in the courtyard. Parker wants to kidnap Robin and Painter again, but Longbaugh, guilt-ridden after seeing her condition, responds: "She's had enough". Despite realizing that the money is bait, Parker and Longbaugh charge headlong into an ambush.
All of Sarno's men are killed in the ensuing firefight. However, Sarno manages to shoot and cripple the already wounded Parker and Longbaugh, and then calls for an ambulance. Painter emerges with Robin and the baby. Lying in a pool of blood, Parker and Longbaugh call out to Sarno, informing him that the baby is in fact Robin and Painter's, and thus Sarno's grandson. Parker wonders aloud if this fact will influence Sarno to let them keep the child. Robin and the baby are then taken away in the ambulance with Painter, Sarno and the money, leaving Parker and Longbaugh to die. Days later, Chidduck's wife reveals that she is pregnant.

Question: How many officers were killed during the shootout with Parker and Longbaugh
Answer: Two