Cell Identity also known as cell global identifier(CGI) is 28 bit.
Cell identity = ENB ID (20 bit) + local cell id(8 bit)
ENB Id is unique with in a PLMN.
Local cell gives unique identification to a cell with in a ENB as it can control 256 cells.
Another tern like ECGI = PLMN ID + cell identity
ECGI is gives unique identification to a cell at global level.
CGI,ECGI all are layer 3 identifiers and allocated by operators.
For Physical layer identification PCI is used But as it is limited (0 - 503) so repetition has to be done But we have to take care about the distance between the ENBs so that UE will not face interference.
Though PCI is same and EARFCN(Represents the carrier frequency) is different then UE will not face interference so it is allowed.But basically we make sure that neighbour PCI + EARFCN should not same.
PCI can be assigned dynamically as part of SON PCI Planning procedure and conflict can be resolved by changing the PCI too.