  We generalize the Szemer\'edi-Trotter incidence theorem, to bound the number
of complete \emph{flags} in higher dimensions. Specifically, for each
$i=0,1,\ldots,d-1$, we are given a finite set $S_i$ of $i$-flats in $\R^d$ or
in $\C^d$, and a (complete) flag is a tuple $(f_0,f_1,\ldots,f_{d-1})$, where
$f_i\in S_i$ for each $i$ and $f_i\subset f_{i+1}$ for each $i=0,1,\ldots,d-2$.
Our main result is an upper bound on the number of flags which is tight in the
worst case.
  We also study several other kinds of incidence problems, including (i)
incidences between points and lines in $\R^3$ such that among the lines
incident to a point, at most $O(1)$ of them can be coplanar, (ii) incidences
with Legendrian lines in $\R^3$, a special class of lines that arise when
considering flags that are defined in terms of other groups, and (iii) flags in
$\R^3$ (involving points, lines, and planes), where no given line can contain
too many points or lie on too many planes. The bound that we obtain in (iii) is
nearly tight in the worst case.
  Finally, we explore a group theoretic interpretation of flags, a generalized
version of which leads us to new incidence problems.

Combinatorics