Revolution frequency measurements of individual ions in storage rings require sophisticated timing detectors. One of common approaches for such detectors is the detection of secondary electrons released from a thin foil due to penetration of the stored ions. A new method based on the analysis of intensities of secondary electrons was developed which enables determination of the charge of each ion simultaneously with the measurement of its revolution frequency. Although the mass-over-charge ratios of $^{51}$Co$^{27+}$ and $^{34}$Ar$^{18+}$ ions are almost identical, and therefore, the ions can not be resolved in a storage ring, by applying the new method the mass excess of the short-lived $^{51}$Co is determined for the first time to be ME($^{51}$Co)=-27342(48) keV. Shell-model calculations in the $fp$-shell nuclei compared to the new data indicate the need to include isospin-nonconserving forces.