  In this paper, we show a comparison of different definitions of the
topological charge on the lattice. We concentrate on one small-volume ensemble
with 2 flavours of dynamical, maximally twisted mass fermions and use three
more ensembles to analyze the approach to the continuum limit. We investigate
several fermionic and gluonic definitions. The former include the index of the
overlap Dirac operator, the spectral flow of the Wilson--Dirac operator and the
spectral projectors. For the latter, we take into account different
discretizations of the topological charge operator and various smoothing
schemes to filter out ultraviolet fluctuations: the gradient flow, stout
smearing, APE smearing, HYP smearing and cooling. We show that it is possible
to perturbatively match different smoothing schemes and provide a well-defined
smoothing scale. We relate the smoothing parameters for cooling, stout and APE
smearing to the gradient flow time $\tau$. In the case of hypercubic smearing
the matching is performed numerically. We investigate which conditions have to
be met to obtain a valid definition of the topological charge and
susceptibility and we argue that all valid definitions are highly correlated
and allow good control over topology on the lattice.
