As you might suspect, there were many different systems in different cultures. Often years were counted as "the N'th year of the reign of King So-and-so" (e.g., in imperial China); this system vestigially survives in Japan, as well as in Taiwan and the USA (where government documents sometimes still give the Common-Era date as well as "in the N'th year of the Republic" or "of Independence"). In some periods of ancient Roman history years were named according to who were the two consuls elected to serve for that year. Often these systems coexisted with a consecutive count of years going back to the supposed creation of the world, or some mythical founding ruler or legendary figure (e.g., China and Rome).
There's always room for discussion, but perhaps the section Calendars and timekeeping from our FAQ will answer your inquiry.