Returns the number of children of a given type @paramcomponent component has and then increments it by 1.
the number of children components of type @paramcomponent
the child component