# 04 — Count public holidays connected to a weekend **What to build:** The statistics popup counts weekday public holidays joined to a weekend by the calculated plan's time-off periods, including connections through leave and adjacent holidays beyond the horizon. **Blocked by:** - 01 — Open plan statistics for calculated leave usage. - [#62 — Optimiser les périodes de repos autour des jours déclarés](https://gitlab.nessar.fr/nessar/vac-optimizer/-/issues/62), which provides shared time-off periods including declared non-working days and adjacent context dates. **Status:** ready-for-agent **GitLab:** [#68](https://gitlab.nessar.fr/nessar/vac-optimizer/-/work_items/68) Source: the agreed Plan Statistics Popup spec for [#3](https://gitlab.nessar.fr/nessar/vac-optimizer/-/issues/3) and [#29](https://gitlab.nessar.fr/nessar/vac-optimizer/-/issues/29), including [#9](https://gitlab.nessar.fr/nessar/vac-optimizer/-/issues/9). Follow the domain glossary and ADRs 0004, 0006, and 0007. - [ ] Show the number of distinct Monday-to-Friday French public-holiday dates in planned time-off periods containing at least one Saturday or Sunday. Each qualifying period contains at least one leave placement or declared non-working day. - [ ] Count direct Monday/Friday connections and connections through leave, such as a Tuesday holiday joined to a weekend by Monday off. Declared non-working days can provide the same connection without consuming a balance. - [ ] Exclude Saturday and Sunday public holidays, naturally long weekends without placed or declared leave, and weekday-only time-off periods that do not reach a weekend. A declaration never becomes a public holiday. - [ ] Include a qualifying holiday immediately outside the submitted horizon when it belongs to the period's full contiguous span. Friday leave followed by a weekend and a Monday holiday outside the horizon includes that Monday holiday. - [ ] Each holiday date contributes once. This is a date count, independent of the weighted public-holiday week value used in optimization; a qualifying Wednesday holiday contributes 1, not 3. - [ ] A valid plan with no qualifying dates displays 0. Complete and retained partial plans use their own producing outcomes and calendar facts, independently of trace delivery or pending input edits. - [ ] Behavior tests verify direct and bridged connections, declaration-only connections, weekend-holiday exclusion, natural long weekends, breaks reaching no weekend, adjacent out-of-horizon holidays, and duplicate dates. Assert the visible count, direct/worker consistency, and retained-plan behavior; run the repository's existing tests, lint, formatting, type checks, and production build. This slice uses the canonical periods supplied by #62 and can proceed independently of ticket 02's descriptive length statistics. It does not change optimization weights or placement decisions.