  We study the following problem. How many distinct copies of $H$ can an
$n$-vertex graph $G$ have, if $G$ does not contain a rainbow $F$, that is, a
copy of $F$ where each edge is contained in a different copy of $H$? The case
$H=K_r$ is equivalent to the Tur\'an problem for Berge hypergraphs, which has
attracted several researchers recently. We also explore the connection of our
problem to the so-called generalized Tur\'an problems. We obtain several exact
results. In the particularly interesting symmetric case where $H=F$, we
completely solve the case $F$ is the 3-edge path, and asymptitically solve the
case $F$ is a book graph.
