This study proposes a failure number-dependent replacement policy for a minimal repairable system with multi-attempt repairs. The motivation for this study is based on the novel notion of "multiple attempts minimal repair," first introduced by Cha and Finkelstein [1,2] recently. Their repair/replacement model, along with useful properties derived and discussed for optimal preventive maintenance (PM) problems, served as the motivation for this study. This paper analyzes the optimal replacement policy based on the number of failures for a multi-attempt minimal repairable system.Our policy's characteristic is that the corrective replacement (CR) of a system is only possible at a system failure instant, rather than implementing a scheduled preventive replacement (PR). Specifically, under our policy, the system is replaced not only after a fixed number of unsuccessful repair attempts (k), but also upon reaching a predetermined failure number (n). We show that the optimal policy (or optimal n*) that minimizes the average cost per unit of time in the long run can be determined by the unique solution of an equation under certain conditions. The numerical results demonstrate that our policy is more efficient in terms of expected cost rate than other policies with the scheduled PR.