  We prove that for every class of graphs $\mathcal{C}$ which is nowhere dense,
as defined by Nesetril and Ossona de Mendez, and for every first order formula
$\phi(\bar x,\bar y)$, whenever one draws a graph $G\in \mathcal{C}$ and a
subset of its nodes $A$, the number of subsets of $A^{|\bar y|}$ which are of
the form $\{\bar v\in A^{|\bar y|}\, \colon\, G\models\phi(\bar u,\bar v)\}$
for some valuation $\bar u$ of $\bar x$ in $G$ is bounded by
$\mathcal{O}(|A|^{|\bar x|+\epsilon})$, for every $\epsilon>0$. This provides
optimal bounds on the VC-density of first-order definable set systems in
nowhere dense graph classes.
  We also give two new proofs of upper bounds on quantities in nowhere dense
classes which are relevant for their logical treatment. Firstly, we provide a
new proof of the fact that nowhere dense classes are uniformly quasi-wide,
implying explicit, polynomial upper bounds on the functions relating the two
notions. Secondly, we give a new combinatorial proof of the result of Adler and
Adler stating that every nowhere dense class of graphs is stable. In contrast
to the previous proofs of the above results, our proofs are completely
finitistic and constructive, and yield explicit and computable upper bounds on
quantities related to uniform quasi-wideness (margins) and stability (ladder
indices).
