Restrict "add more" button to add new fieldset after adding 5 fieldsets
This can be achieved using css. First of all write hook_form_alter() on your custom module. and your code should be like this..


function MYMODULE_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {
    if (isset($form['your_field']['und']['#max_delta']) && $form['your_field']['und']['#max_delta'] == 4) {
      $form['your_field']['und']['add_more']['#prefix'] = '';
      $form['your_field']['und']['add_more']['#suffix'] = '';    
    }
  }
}



Where $form['your_field'] is your field collection field machine name. You can write your custom css on #prefix and #suffix and set it to display none.