  We calculate exactly cumulant generating functions (full counting statistics)
for the transverse, staggered magnetization and the domain walls at zero
temperature for a finite interval of the XY spin chain. In particular, we also
derive a universal interpolation formula in the scaling limit for the full
counting statistics of the transverse magnetization and the domain walls which
is based on the solution of a Painlev\'e V equation. By further determining
subleading corrections in a large interval asymptotics, we are able to test the
applicability of conformal field theory predictions at criticality. As a
byproduct, we also obtain exact results for the probability of formation of
ferromagnetic and antiferromagnetic domains in both $\sigma^z$ and $\sigma^x$
basis in the ground state. The analysis hinges upon asymptotic expansions of
block Toeplitz determinants, for which we formulate and check numerically a new
conjecture.
