TL;DR; SharePoint lists include a built-in unique, auto-generated ID column. Enable its display in list settings to show unique IDs for each item without custom solutions.

This seams to be a common problem, and one that I get many calls from users about:
I have a query with our Sharepoint site and was advised that you were probably the best person to ask.
I have created a list under:
http://sharepoint/sites/department/Lists/ListName/AllItems.aspx
I need the first column (Issue ID) to be an automatically generated number but can’t seem to get it. Would it be possible for you to take a look and advise?
You can’t add a new unique auto-generated ID to a SharePoint list, but there already is one there! If you edit the “All Items” view you will see a list of columns that do not have the display option checked.
There are quite a few of these columns that exist but that are never displayed, like “Created By” and “Created”. These fields are used within SharePoint, but they are not displayed by default so as not to clutter up the display. You can’t edit these fields, but you can display them to the user. if you check the “Display” box beside the ID field you will get a unique and auto-generated ID field displayed in your list.
Technorati Tags: SP 2007 Answers SP 2010 SharePoint
If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.
We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.

Teleplan

New Signature

Freadom

Slicedbread

Capita Secure Information Solutions Ltd

Deliotte

YearUp.org

Epic Games

Qualco

MacDonald Humfrey (Automation) Ltd.

ProgramUtvikling
Boxit Document Solutions

Slaughter and May

Workday

Philips

Healthgrades

Brandes Investment Partners L.P.

Alignment Healthcare

Ghana Police Service

Royal Air Force

Department of Work and Pensions (UK)

Nottingham County Council

Washington Department of Enterprise Services

Washington Department of Transport

Cognizant Microsoft Business Group (MBG)

Graham & Brown
Boxit Document Solutions

Flowmaster (a Mentor Graphics Company)

Capita Secure Information Solutions Ltd

Schlumberger