Method of measuring concentration of ions in electrolyte solutions