The physics
Flux counts the field lines that pass through a surface. For a flat window, only the field's part along its normal counts.
Φ = E A cos θ
Gauss's law: the net flux out of a closed surface is qin/ε0. Only the charge inside counts.
Φnet = qin / ε0 ε0 = 8.85 × 10⁻¹² C²/(N m²)
Lines leaving count plus. Lines entering count minus. A charge outside sends its lines in and out again, so it adds nothing.
For a long charged wire, only the length inside the surface counts.
Φ = λ Linside / ε0