context: Mattie Ross (Hailee Steinfeld), a 14-year-old from Yell County, Arkansas, is determined to avenge the murder of her father. Frank Ross was killed by his hired hand, Tom Chaney (Josh Brolin), after trying to dissuade a drunken Chaney from shooting a fellow card player who had allegedly cheated him. Chaney stole Ross's horse and fled the town. Enraged that no one bothered to pursue or convict Chaney, Mattie decides to take the investigation into her own hands.Leaving her mother and two younger siblings at home, Mattie travels to Fort Smith where her father was killed. She identifies his body for the undertaker. Despite her age, Mattie is extremely quick-witted and confident, and is a fearless bargainer. She sells her father's now useless string of ponies back to the reluctant seller (Dakin Matthews), and acquires three hundred and twenty dollars from the sale. Renting a room at a Fort Smith boarding house, where her father had been staying before his death, Mattie resolves to hire a U.S. marshal to pursue and catch Tom Chaney. After consulting the local sheriff, she settles on the marshal described as the meanest: Rueben "Rooster" Cogburn (Jeff Bridges). After trailing Cogburn to a saloon, she attempts to hire him but is rebuffed. Mattie makes a second attempt after a court hearing at which Cogburn was questioned, but Cogburn turns her down again, doubting that she actually possesses the fifty dollars she offered him as a reward for Chaney's capture.A Texas Ranger, LaBouef (Matt Damon), takes a room at the boarding house and consults Mattie about her endeavor. LaBouef had been tracking Chaney for several months after Chaney had killed a Texas senator in an argument. He offers to combine his knowledge with Cogburn's to track Chaney down. Mattie rejects his offer.
  The following day, Mattie buys back one of her father's ponies to use on her journey, naming him Little Blackie. She speaks with Cogburn who has decided to accept her offer. However, he initially refuses to let Mattie accompany him as she had planned. After Mattie threatens to report him to the sheriff if Cogburn leaves with her fifty dollars, he seemingly gives in and instructs her to be ready for the journey the next morning.Mattie takes her father's clothing and gun and rides her horse to Cogburn's lodgings in the morning, only to find he has left without her (with LaBouef), and left her a train ticket back to Yell County. Angrily, Mattie follows his trail to a nearby river, spying the two men on the opposite bank. After the ferryman refuses to take her across, Mattie rides Little Blackie into the water and the two swim to the other side. Cogburn seems impressed by Mattie's gumption, but LaBouef is clearly irritated by her domineering attitude. After an argument with Cogburn (whom he also dislikes), LaBouef abandons the mission, taunting Cogburn for being "hoo-rahed by a little girl."Mattie and Cogburn continue the journey, forming something of a kinship as they travel. Cogburn picks up the information that Tom Chaney is not too far ahead of them, and that he may have joined up with another outlaw, Lucky Ned Pepper, and his gang. Seeking shelter from the cold, the two discover a cabin at nightfall. Cogburn recognizes the pair of inhabitants as outlaws tied in with the Ned Pepper gang, one of them badly shot in the leg. Suspecting Ned and his gang will arrive at the cabin soon, Cogburn offers to take the injured man to a doctor and to give them some escape time if they provide information. The injured man (Domhnall Gleeson), desperate for medical attention, begins to talk, but is stabbed by the other man (Paul Rae), who is then shot dead by Cogburn. As he dies, the man with the injured leg admits that Lucky Ned is expected at the cabin that very night.Cogburn and Mattie hide in the bushes near the cabin, waiting for the gang to arrive. They first see LaBouef approach the cabin, continuing the search alone. However, the Ned Pepper gang arrives moments later and lassos LaBouef, dragging him behind a horse. From cover, Cogburn shoots two of the gang members (inadvertently winging LeBouef in the arm) and the others flee. He and Mattie take the injured LaBouef into the cabin. Cogburn drinks heavily throughout the night and is incredibly drunk the next morning. He and LaBouef argue over each other's shooting skills, but Mattie attempts to keep the two men on task.After setting up camp in the woods that night, Cogburn becomes increasingly frustrated with their mission, claiming he has been "dragged into a wild goose chase by a harpy in trousers and a nincompoop." He bows out of the agreement, and LaBouef leaves again, though he has gained a new-found respect for Mattie. Both men agree that Chaney's trail is cold, and that continuing the search would be useless. A dejected Mattie falls asleep.The next morning, Mattie goes to a nearby stream for water and notices a stranger there watering his horses. Shocked, she realizes it is none other than Tom Chaney himself. Chaney recognizes her and does not initially act hostile until Mattie pulls a revolver and attempts to take him into custody. An angered Chaney approaches with his rifle and Mattie fires, but only grazes his arm. Chaney drags her to the opposite bank, where the rest of the Ned Pepper gang has set up camp. Cogburn, having slept in the woods through the night, hears the commotion but is too late to retrieve Mattie.Lucky Ned Pepper (Barry Pepper), familiar with Cogburn, shouts across the stream to him and bargains Mattie's life for ample escape time. Cogburn agrees to not pursue the gang if Mattie is not harmed, and appears to ride away over the hills. Pepper is impressed by Mattie's strength of will, and assures her that she will not be hurt. While Ned and the three other gang members leave to address finances, Chaney is ordered to stay with Mattie and to leave her somewhere safe. Chaney tries to get out of the assignment, but to no avail. Mattie, despite Lucky Ned's assurance otherwise, fears that Chaney will kill her once they are alone. After the gang departs, Mattie offers to give Chaney an affidavit if he sets her free. Chaney refuses, saying that all he needs is Mattie's silence. He attacks her and holds a knife to her throat, but is knocked unconscious by LaBouef, who had remained in the area and heard the gunshots. He explains that he rode back to the woods, met with Cogburn, and outlined a plan for Mattie's rescue. He says that Cogburn himself has arranged a showdown with Lucky Ned.As Mattie and LeBouef watch from a hilltop, Cogburn comes face to face with Ned and the three other gang members. Having pursued Ned on and off for some time, Cogburn gives Ned the choice of being taken back to Fort Smith to be hanged, or to be killed on the spot. Ned taunts Cogburn, calling him a "one-eyed fat man," and Cogburn charges his horse. Holding the reins in his teeth, he fires revolvers with both hands, killing the three other men and mortally wounding Lucky Ned before his horse takes a fall and traps him underneath. With his last moments of strength, Ned prepares to kill Cogburn. From the hilltop, LaBouef proves his shooting ability by making a 400 yard shot, shooting Lucky Ned off his horse before he can harm the marshal. Moments later, LaBouef is knocked unconscious by a now-awakened Tom Chaney, who attempts to grab LaBouef's rifle. Mattie intercepts and gets the gun herself, proudly shooting Tom Chaney at last.Though her goal is completed, the blast from the gun sends Mattie stumbling backwards into a deep pit. She calls for help, but LaBouef is still out cold. Cogburn appears and begins to scale the side of the pit with a rope to rescue her, but Mattie's left hand has already been bitten by a rattlesnake. Cogburn retrieves her and temporarily treats her wound, but knows he must get her medical attention quickly or she will die. A revived LaBouef hoists them out of the pit, and Cogburn and Mattie ride away on Little Blackie.After miles of running, Little Blackie begins to suffer from exhaustion and eventually collapses. Knowing they cannot stop their journey, Cogburn shoots the horse and continues on, carrying Mattie himself. They soon reach a general store and Mattie is taken inside.Twenty five years later, 40-year-old Mattie (Elizabeth Marvel) looks back on her adventures. Her arm had been severely damaged by the snake bite, and was amputated . She explained that Cogburn had departed by the time she came back into consciousness. After arriving home, Mattie had written to Cogburn, inviting him to visit her and collect his fifty dollar reward, but he never responded or appeared. The adult Mattie learns that the elderly Cogburn is a performer in a traveling wild west show, and finally exchanges letters with him, arranging to meet once again to swap stories. Arriving at the fairgrounds, Mattie is told that Cogburn had died three days earlier.Mattie has Cogburn's body moved to her family plot. She reflects on her life; she never married, and kept her no-nonsense attitude over the years. She never heard again from LaBouef, but holds him in her memory. Mattie laments that "time just gets away from us."
question: Cogburn kills how many members of Ned's gang?
answer: two