You add a 'text' field, and they set the type to PARAM_INT:
$mform->addElement('text', 'myintfield', ...);
$mform->setType('myintfield', PARAM_INT);
$mform->addElement('text', 'myintfield', ...);
$mform->setType('myintfield', PARAM_INT);