Add total count for entities.