private function totalFamilies(): Collection
    {
        return DB::table('gedcom')
            ->leftJoin('families', 'f_file', '=', 'gedcom_id')
            ->groupBy('gedcom_id')
            ->pluck(DB::raw('COUNT(f_id)'), 'gedcom_id')
            ->map(static function (string $count) {
                return (int) $count;
            });
    }