Entity limit
For reasons of memory allocation, there is a limit to the number of entities Source can manage at once.

Engine limits
There can be up to 4096 entities. This total is split into two groups of 2048:
- Non-networked entities, which exist only on the client or server.dll (e.g. death ragdolls, logicals).
- Entities with associated edicts, which can cross the client/server divide.
If the game tries to assign a 2049th edict it will exit with an error message, but if it tries to create a 2049th non-networked entity it will merely refuse and print a warning to the console. The logic behind this may be that an entity spawned dynamically (i.e. not present in the map) but not assigned an edict probably isn't too important.
The two entity lists are created by CBaseEntityList::CBaseEntityList()
using NUM_ENT_ENTRIES
and MAX_EDICTS
. Neither of those values can be changed without breaking compatibility with the engine.


Hammer limits
Hammer itself has no entity limit, but VBSP's is 8192. This is double the combined total accepted by the engine,

VBSP places a size limit of 384KB on the entdata
block however, which prevents any map from coming anywhere near 8192 designer-placed entities. Remember that more entities will exist in a map at runtime than were compiled into it by the level designer!

entdata
limit increased or removed.