What is the number of heart attacks (on average) a person can get before dying of one?

The size. The number does not matter as much as the size of the area of the heart attack.
Heart attacks. Death from heart attacks are from two causes: sudden death from arrhythmia which can happen with one or many heart attacks, or from heart failure due to accumulated death of heart muscle of a total of 40% of the muscle with one or more heart attacks.