Implementation for watchNumberOfComponents (needs to be tested!).