Yeah, the numbering confused me as well when I first started looking at it, but it does make sense after a bit. You have the model class: i3, i5, and i7 and then you have the model numbers.
The marketting class tells you at a glance (for a given generation) how the CPUs compare: a 2nd gen i7 has more features and generally faster than a 2nd gen i5, etc... Then the model number shows the relative performance/feature within a given generation: 2500 has fewer features or performance than a 2700, etc...
What may not be apparent at first blush is that it is the model number that encodes the generation bit, not the model class. Tthey've gone through 4 generations of Core i7/i5/i3 and the marketting classes haven't changed. The model numbers have changed, though:
Core i7 965 (Nehalem)
Core i7 2700K (Sandy Bridge)
Core i7 3770K (Ivy Bridge)
Core i7 4770K (Haswell)
As you can see, the first digit encodes the generation of chip, with only the original Core i7 generation being the outlier. You can't usually compare across generations, since there are too many variables, though you can crudely estimate that a Zxxx model will be better than a Yxxx model.
The big pain is knowing what features a given chip has and for that you need http://ark.intel.com/