The specific heat capacity of mercury is given in but the quantity of mercury is given in mass units. We can either convert the heat capacity to mass units or the mass to moles. I choose to do the latter:
The minimum mass of ice required to chill the mercury to is the mass which is exactly sufficient to accomplish this purpose. Thus, the heat balance condition is