Obviously there was no usage of dates based around the birth of Christ before it occurred. Therefore how were years measured before this point and in non-Christian areas of the world?
With other calendars. Many parts of the world don't use your calendar today. Your calendar is by no means the only one. Jewish calendar used in Israel (now year 5781), Chinese calendar used in China and South East Asia (now year 4718). Dead calendars include the Inca calendar, the Greek calendar, and more. Also the Julian calendar measuring from the same event that supposedly happened, but doesn't use leap year (what the Gregorian calendar came from) and is still used by the Orthodox Church. Also, after your calendar came the Islamic calendar used in most of the Middle East (now year 1442).
Always more that can be said, but you may be interested in this section of our FAQ.