# Issue #201: countArchived() Loads All Members into Memory

## Problem

The `MemberService::countArchived()` method loads ALL members into memory just to count archived ones:

```php
public function countArchived(): int {
    $allMembers = $this->memberMapper->findAll(null, null, true);
    return count(array_filter($allMembers, fn(Member $m) => $m->getDeletedAt() !== null));
}
```

This is extremely inefficient for large member databases.

## Impact

- Memory exhaustion with large member counts
- Slow archive page loads
- N+1 query problem (sub-entities loaded unnecessarily)

## Solution

Add a COUNT query to the mapper:

```php
public function countArchived(): int {
    $qb = $this->db->getQueryBuilder();
    $qb->select($qb->createFunction('COUNT(*)'))
        ->from($this->getTableName())
        ->where($qb->expr()->isNull('deleted_at'));
    
    // Add: where status = 'geloescht' or deleted_at IS NOT NULL
    ...
}
```

Alternatively, add a `deleted_at IS NOT NULL` check to the existing `findAll()` method and return only the count.

## Tasks

- [ ] Add `MemberMapper::countArchived(): int` using `SELECT COUNT(*) WHERE deleted_at IS NOT NULL`
- [ ] Update `MemberService::countArchived()` to use the new mapper method
- [ ] Verify the count matches the archive list page size

## Labels

- bug
- backend
- priority:high
- performance