Get part of element ID
The parents method will traverse the DOM all the way up the chain. Rather use the closest method, which will stop at the first match:

$('.add').on('click', function(e) {
    e.preventDefault();

    var number = $(this).closest('.tab_content').attr('id').split('_')[1];

    alert(number);
});