'Returns the number of forms that are required in this FormSet.'

def initial_form_count(self):

    if self.is_bound:
        return self.management_form.cleaned_data[INITIAL_FORM_COUNT]
    else:
        initial_forms = ((self.initial and len(self.initial)) or 0)
        if (initial_forms > self.max_num >= 0):
            initial_forms = self.max_num
    return initial_forms
