def num_shifts_in_stack(params):
    """Calculate how many time points (shifts) will be used in loss functions.

    Arguments:
        params -- dictionary of parameters for experiment

    Returns:
        max_shifts_to_stack -- max number of shifts to use in loss functions

    Side effects:
        None
    """
    max_shifts_to_stack = 1
    if params['num_shifts']:
        max_shifts_to_stack = max(max_shifts_to_stack, max(params['shifts']))
    if params['num_shifts_middle']:
        max_shifts_to_stack = max(max_shifts_to_stack, max(params['shifts_middle']))

    return max_shifts_to_stack