Sometimes, they are defined by what order they come in in the particular series (for example, BW001, where Ash first travels to the Unova region). However, they are also defined by how the come in the total order, (the same episode is the 658th of the entire anime).