The determination of foil thickness by scanning transmission electron microscopy