The KOTO ($K^0$ at Tokai) experiment aims to observe the CP-violating rare
decay $K_L \rightarrow \pi^0 \nu \bar{\nu}$ by using a long-lived neutral-kaon
beam produced by the 30 GeV proton beam at the Japan Proton Accelerator
Research Complex. The $K_L$ flux is an essential parameter for the measurement
of the branching fraction. Three $K_L$ neutral decay modes, $K_L \rightarrow
3\pi^0$, $K_L \rightarrow 2\pi^0$, and $K_L \rightarrow 2\gamma$ were used to
measure the $K_L$ flux in the beam line in the 2013 KOTO engineering run. A
Monte Carlo simulation was used to estimate the detector acceptance for these
decays. Agreement was found between the simulation model and the experimental
data, and the remaining systematic uncertainty was estimated at the 1.4\%
level. The $K_L$ flux was measured as $(4.183 \pm 0.017_{\mathrm{stat.}} \pm
0.059_{\mathrm{sys.}}) \times 10^7$ $K_L$ per $2\times 10^{14}$ protons on a
66-mm-long Au target.