You can create many different custom enchants, which execute commands.
enabling the handling of TEBlockExplosion will cause the number of attempt to execute the command, and it may cuase a lag.
If you're after something to trigger based on the number of mined blocks, you might need CommandMinerEnchant instead.