  Let $\Omega$ be a smooth real analytic submanifold of a complex manifold $X$.
We establish and study the link between the following 3 subjects: 1)
topological properties of smooth families of attached analytic discs, the
manifold $\Omega$ admits, 2) lower bounds for dimensions of complex tangent
spaces of $\Omega$, 3) a generalization of the argument principle for smooth
families of holomorphic mappings from the standard complex disc to $X$.
  In particular, we obtain characterization of complex manifolds and their
boundaries in terms of attached analytic discs. The special case when $\Omega$
is the graph, leads to new characterizations of holomorphic and $CR$ functions,
and in particular, to solutions of some open problems about such functions.
