def calculate_number_of_stems(morphology):
    """
        Calculate the number of soma stems.
        This is defined as the total number of non-soma child nodes on soma nodes.

        Parameters
        ----------

        morphology: Morphology object

        Returns
        -------

        Scalar value

    """
    soma = morphology.get_root()
    return len(morphology.children_of(soma))
