The basic process operating in a charge is speed of advance against rate (or effectiveness) of fire. If the attackers advance at a more rapid rate than the defenders can kill or disable them then the attackers will reach the defenders. When a charge was not successful that will often leave the would-be attackers extremely vulnerable to a counter-charge.