Are entity IDs assigned per entity or across the board? I'm building an electronic parts database in D7 and want to create a custom "part" entity with bundles for resistors, capacitors, etc.

I also need to autocreate an atomic serial part number common to all bundles, i.e no separate part numbering system per bundle.  I was going to use the Serial module but it only works with nodes.  In D6 I did everything in nodes for a similar application and just used the NID, but this parts DB really wants a cleaner solution using entities. I'd like to use the entity ID as the serial part number but only if it's unique per custom entity type.

Question is: Does each custom entity type I create have its own set of entity IDs or is it like in D6 with nodes where NIDs apply across all content types?
Each entity type has it's own ID sequence. For example a user may have the uid of 1 while a node may also have an nid of 1. Similarly a taxonomy term may have a tid of 1. In all those cases the "entity_id" is 1.

Regarding the serial module, as it provides a field via the Field API, presumably that field could be attached to any entity bundle.

In regards to linking your entities, you could probably use the entityreference module to create reference links between your entities.