Question: how many atoms are there in one molecule of mg(hco3)2?
Answer: Ignore the Mg because, as magnesium is an element, it doesn't contain oxygen. In other words you have three oxygen atoms in (HCO3) but you have two lots of (HCO3) so 3 x 2 = 6. Six oxygen atoms.