Added nested for loops for getting mine count