  The four-form field strength in F-theory compactifications on Calabi-Yau
fourfolds takes its value in the middle cohomology group $H^4$. The middle
cohomology is decomposed into a vertical, a horizontal and a remaining
component, all three of which are present in general. We argue that a flux
along the remaining or vertical component may break some symmetry, while a
purely horizontal flux does not influence the unbroken part of the gauge group
or the net chirality of charged matter fields. This makes the decomposition
crucial to the counting of flux vacua in the context of F-theory GUTs. We use
mirror symmetry to derive a combinatorial formula for the dimensions of these
components applicable to any toric Calabi--Yau hypersurface, and also make a
partial attempt at providing a geometric characterization of the four-cycles
Poincar\'e dual to the remaining component of $H^4$. It is also found in
general elliptic Calabi-Yau fourfolds supporting SU(5) gauge symmetry that a
remaining component can be present, for example, in a form crucial to the
symmetry breaking ${\rm SU}(5) \longrightarrow {\rm SU}(3)_C \times {\rm
SU}(2)_L \times {\rm U}(1)_Y$. The dimension of the horizontal component is
used to derive an estimate of the statistical distribution of the number of
generations and the rank of 7-brane gauge groups in the landscape of F-theory
flux vacua.
