updating total number of attacks on update()