Mattie Ross (Hailee Steinfeld), the narrator and protagonist, explains that her father was murdered by Tom Chaney (Josh Brolin) when she was 14 years old. While collecting her father's body in Fort Smith, Arkansas, Mattie asks the local sheriff about the search for Chaney. He tells her that Chaney has fled with "Lucky" Ned Pepper and his gang into Indian Territory, where the sheriff has no authority, so she inquires about hiring a Deputy U.S. Marshal. The sheriff gives three recommendations, and Mattie chooses Rooster Cogburn. Cogburn initially rebuffs her offer, not believing she has the money to hire him. She raises the money by aggressively horse-trading with Colonel Stonehill.Texas Ranger LaBoeuf arrives in town after pursuing Chaney for the murder of a Texas State Senator. LaBoeuf proposes to team up with Cogburn, but Mattie refuses his offer. She wishes Chaney to be hanged in Arkansas for her father's murder, not in Texas for killing the senator. Mattie also insists on traveling with Cogburn but he leaves without her, having gone with LaBoeuf to apprehend Chaney and split the reward.After being refused passage on the ferry that conveyed Cogburn and LaBoeuf, Mattie crosses the river on horseback. LaBoeuf expresses his displeasure by birching Mattie with a stick, but Cogburn eventually allows Mattie to accompany them. After a dispute over their respective service with the Confederate States of America, Cogburn ends their arrangement and LaBoeuf leaves to pursue Chaney on his own. Cogburn and Mattie meet a trail doctor who directs them to an empty dugout for shelter. They find two outlaws, Quincy and Moon, and interrogate them. Quincy insists they have no information about the Pepper gang, but eventually Moon divulges what he knows; Quincy fatally stabs Moon, and Cogburn shoots Quincy dead. Before dying, Moon says Pepper and his gang will be returning for fresh horses that night.LaBoeuf arrives at the dugout and is confronted by the Pepper gang. Cogburn, hiding on the hillside with Mattie, shoots two gang members and accidentally hits LaBoeuf, but Pepper escapes. The next day, a drunken Cogburn gets in an argument with the wounded LaBoeuf, who departs again. While retrieving water from a stream, Mattie encounters Chaney. She shoots and wounds him, but he survives and drags her back to Ned, who forces Cogburn to leave by threatening to kill her. Ned leaves Mattie alone with Chaney, ordering him not to harm her or he will not get paid after his remount arrives.Chaney tries to knife Mattie, but LaBoeuf appears and knocks Chaney out, explaining that he and Cogburn devised a plan. They watch from a cliff as Cogburn takes on the remaining members of Ned's gang, killing two and wounding Ned before his horse is shot and falls, trapping Cogburn's leg. LaBoeuf snipes Pepper from roughly four hundred yards away. Chaney regains consciousness and surprises LaBoeuf, knocking him unconscious with a rock. Mattie seizes LaBoeuf's rifle and shoots Chaney in the chest. The recoil knocks her into a deep pit. In an attempt to escape, Mattie awakens a rattlesnake. She is bitten before anyone can get to her. Cogburn cuts into her hand to suck out as much of the venom as he can, then rides day and night to get Mattie to a doctor, carrying her on foot after her horse collapses from exhaustion.Twenty-five years later, in 1903, Mattie reveals through narration that her left forearm was amputated due to gangrene from the snakebite. Cogburn stayed until she was out of danger, but left before she regained consciousness. She never saw Cogburn again, despite a letter she wrote inviting him to collect the money she still owed him. She receives a note from Cogburn inviting her to a travelling Wild West show where he now performs. She arrives, only to learn that Cogburn died three days earlier. She has his body moved to her family cemetery. Standing over Cogburn's grave, she reflects on her decision to move his remains, and about never having married. She also reveals that she never saw LaBoeuf again.
Output: Question: Cogburn kills how many members of Ned's gang?, Answer: two