Very possible, when you select the weapon, store the weapon modelid to a var. Then show the new input dialog box. When they enter the bullet count, use the stored var as the modelid, use the textinput from the dialog function for the bullets.
EDIT: If you need more helping coding this, just ask. No point me showing you code, if you understand how to do it.