  In many physical applications, bound states and/or resonances are observed,
which raises the question whether these states are elementary or composite.
Here we elaborate on several methods for calculating the compositeness $X$ of
bound states and resonances in Quantum Mechanics, and in Quantum Field Theory
by introducing particle number operators. For resonances $X$ is typically
complex and we discuss how to get meaningful results by using certain phase
transformations in the $S$ matrix.
