Morris and Saxton used the method of containers to bound the number of $n$‐vertex graphs with $m$ edges containing no $\ell $‐cycles, and hence graphs of girth more than $\ell $. We consider a generalization to $r$‐uniform hypergraphs. The *girth* of a hypergraph $H$ is the minimum $\ell \ge 2$ such that there exist distinct vertices ${v}_{1},\text{\u2026},{v}_{\ell}$ and hyperedges ${e}_{1},\text{\u2026},{e}_{\ell}$ with ${v}_{i},{v}_{i+1}\in {e}_{i}$ for all $1\le i\le \ell $. Letting ${N}_{m}^{r}(n,\ell )$ denote the number of $n$‐vertex $r$‐uniform hypergraphs with $m$ edges and girth larger than $\ell $ and defining $\lambda =\lceil \left(r-2\right)\u2215\left(\ell -2\right)\rceil $, we show
which is tight when $\ell -2$ divides $r-2$ up to a $1+o\left(1\right)$ term in the exponent. This result is used to address the extremal problem for subgraphs of girth more than $\ell $ in random $r$‐uniform hypergraphs.