def get_num_forces(cgmodel):
    """
    Given a CGModel() class object, this function determines how many forces we are including when evaluating the energy.

    :param cgmodel: CGModel() class object
    :type cgmodel: class

    :returns:
        - total_forces (int) - Number of forces in the coarse grained model

    :Example:

    >>> from foldamers.cg_model.cgmodel import CGModel
    >>> cgmodel = CGModel()
    >>> total_number_forces = get_num_forces(cgmodel)

    """
    total_forces = 0
    if cgmodel.include_bond_forces:
        total_forces = total_forces + 1
    if cgmodel.include_nonbonded_forces:
        total_forces = total_forces + 1
    if cgmodel.include_bond_angle_forces:
        total_forces = total_forces + 1
    if cgmodel.include_torsion_forces:
        total_forces = total_forces + 1
    return total_forces