#477: count unread private threads for UI
Code tweaks