Best way to select multiple items from dropdown or type-ahead search then enter a quantity in a textbox for each

I am trying to create a page that asks the user to select all the states in which the user’s business has locations in. Once the states are selected, the user should be able to enter the number of locations for each of the selected states. What would be the best way to do this? I have thought of using a type-ahead search for the selection, or just a regular dropdown menu. Either would be fine.