def number_of_constituents(bc_class):
    """
    Calculates the number of constituents

    Args:
        bc_class: The ADH simulation class that holds all simulation information

    Returns:
        The number of transport constituents

    """
    num_trn = 0
    cn = bc_class.constituent_properties
    if cn.salinity:
        num_trn += 1
    if cn.temperature:
        num_trn += 1
    if cn.vorticity:
        num_trn += 1
    if not cn.general_constituents.empty:
        num_trn += len(cn.general_constituents.index)
    if not cn.sand.empty:
        num_trn += len(cn.sand.index)
    if not cn.clay.empty:
        num_trn += len(cn.clay.index)
    return num_trn