You're ignoring the fact that each mine contains a small amount of handwavium. In the Trek universe, it's apparently possible to extract reasonable amounts of energy from the vacuum itself and the mass is provided to the relevant mine by its neighbours (who then use the energy they've extracted to create more mass):
The replicator system was designed to accommodate a swarm detonation of up to twenty mines and still maintain the total shell. The replicator was a kludge of Cardassian and Starfleet types and included a raw-matter supply container able to contribute enough mass to build one-sixty-fifth of a complete mine. Mass for any one new mine was transported through the replicator's subspace emitters from as many mines away as was necessary. In a bucket-brigade system. As distributed over the entire shell, enough mass was stored to replace over 2,500 mines.
In the event the mass supply dwindled below 85 percent, the replicator sections were designed to extract particles from the zero-point vacuum domain to replenish the system. The threshold was set deliberately high because of the long lead time required to produce small numbers of particle pairs. - DS9: Technical Manual
Theoretically, the Cardassians could have overwhelmed the system by continually throwing things at the minefield but in practice, the mines can operate indefinitely, replacing broken mines and recharging themselves.