Answer: Four
In the movie, S.W.A.T. officers were able to successfully resolve the situation, killing the four suspects and rescuing the hostages inside the bank. In the bank, one robber was shot by Officer Gamble (Jeremy Renner). Gamble's bullet struck a female hostage in the upper shoulder, then traveled through her body, fatally striking the suspect. Gamble's actions violated the supervising lieutenant's order to "Hold your position". This action lead to Gamble's removal from S.W.A.T., along with Street, who had been forced to follow and back up his partner.
This scene was in part based on an actual 1997 bank robbery involving LAPD S.W.A.T. Two heavily armed gunmen wearing ski masks and body armor, attempted to rob a North Hollywood Bank of America branch. Over 1,100 rounds were fired from automatic weapons at innocent bystanders, responding police personnel, and news helicopters reporting the robbery live on television. In the end, 6 bystanders and 11 police officers were shot. All survived. One robber committed suicide by shooting himself in the head during his escape from the bank, and the other robber was shot and killed by S.W.A.T. during his escape. Before it was over, LAPD officers had to borrow heavy duty weapons from a local gun shop to match the fire power of the gunmen. In the movie, all four robbers were killed by S.W.A.T. officers, two outside the bank, two inside the bank. As both actual gunmen died during their escape, the movie took a few "creative liberties", but most of the basic facts, along with much of the police radio broadcast, were accurate.