The users_count relation on UserGroup is defined as a belongsToMany count against the users_groups pivot table:
'users_count' => [
User::class,
'table' => 'users_groups',
'count' => true
]
However, the primary_group relationship is a separate belongsTo using a primary_group_id foreign key stored directly on the users table. As a result, users whose only group membership is through primary_group_id — which includes every user created through the default registration flow — are not counted in the users_count column displayed in the backend UserGroups list.
The users_count relation on UserGroup is defined as a belongsToMany count against the users_groups pivot table:
However, the primary_group relationship is a separate belongsTo using a primary_group_id foreign key stored directly on the users table. As a result, users whose only group membership is through primary_group_id — which includes every user created through the default registration flow — are not counted in the users_count column displayed in the backend UserGroups list.