  In 1974, Erd\H{o}s posed the following problem. Given an oriented graph $H$,
determine or estimate the maximum possible number of $H$-free orientations of
an $n$-vertex graph. When $H$ is a tournament, the answer was determined
precisely for sufficiently large $n$ by Alon and Yuster. In general, when the
underlying undirected graph of $H$ contains a cycle, one can obtain accurate
bounds by combining an observation of Kozma and Moran with celebrated results
on the number of $F$-free graphs. As the main contribution of the paper, we
resolve all remaining cases in an asymptotic sense, thereby giving a rather
complete answer to Erd\H{o}s's question. Moreover, we determine the answer
exactly when $H$ is an odd cycle and $n$ is sufficiently large, answering a
question of Ara\'ujo, Botler and Mota.
