You can measure non-stoichiometry by determining how many atoms are present. There are a number of ways to do this.
You can dissolve your unknown material in an acid and use a reagent to precipitate away one element but not another. By keeping careful track of the number of moles of reagent you used, you can know how many atoms were precipitated and thus determine the stoichiometry of the original sample. Once upon a time, this approach was used to demonstrate the fact that some chemicals ARE stoichiometric!
Today, another commonly used method is to count the number of X-rays emitted by a sample in an electron microscope. Each atom emits X-rays with different amounts of energy so you can determine not only what atoms are present, but how many relative to other atoms.
For example, you can measure iron sulfide which stoichiometrically should have one Fe atom for each S. Fe emits X-rays with about 2.5 times the energy of S, so they are easy to tell apart. You then place a known stoichiometric iron sulfide (for example, using chemistry as above) in the microscope and measure how many Fe and S X-rays you get. Let's say, hypothetically, you get one X-ray from Fe for each X-ray from S (just to keep the math simple). Then you place a non-stoichiometric iron sulfide in and suddenly you get about 0.9 Fe X-rays for each S. Presto, you know you have about 9 Fe atoms for each 10 S.
Note: For simplicity sake, I left out all the intricacies of the experimental method which would have to be considered in a real measurement. If you are interested you can google: Energy Dispersive Spectroscopy (EDS), wavelength dispersive spectroscopy (WDS), and wet chemical analysis.