How to use Asset Database Count for item ID

Anyone know how to utilize the database.count as an item’s ID? I’d rather use that than a standard value you enter because it would be easy to get confused and enter the wrong number.

ISObjectDatabase db;
int ID=db.GetCount();

selectedItem.ID = GUILayout.Label("Item ID:" , ID);

This is part of an editor window.

GUILayout.Label is a void method, if you want to set the ID you should use textField