How to check numbers 0-[CurrentCount] of an input field

I have been working on a page for a gaming group I am a part of, but I am not very experienced in HTML nor JS, but figured I would try it out. After a couple of hours of work, I realized I could have used objects… but I do not want to take the time to rebuild it now as I have put a ton of work into it.

currently I have a function to add a couple of input fields and give them personalized IDs for each

function add(){
        var teamList = parseInt($('#teamList').val())+1; 
        var feedMenu = parseInt($('#feedMenu').val())+1; 
        var inputMenu = "<p> <input type='text'  id='teamlead"+teamList+"'> <select  id='SS"+teamList+"'>  </p>";

        var feedText = "<p id=stantonList"+teamList+"> Stanton "+teamList+": '<span id=contentGen"+teamList+"></span>' | <span id=listValue"+teamList+"></span> </p>";

        $('#teamMenu').append(inputMenu); 
        $('#feedMenu').append(feedText);
        $('#teamList').val(teamList); 
        $('#feedMenu').val(feedMenu);

    }

I am trying to create a button that will collect all of the +teamList+ values for the respective field IDs, yet I am drawing a blank, and cannot find documentation on anything regarding it. (Most likely as I am the only one with a small enough of an intelligence to try it this way).