Calculate number of coins