Add countByFilter parity coverage for the query (LIKE) path so the shared FILTER_WHERE slice and count can't drift, and an integration test proving deletePerson detaches a person referenced as both sender and receiver before delete — the documents survive (sender nulled, receiver link removed) with no FK orphan. Refs #667 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>