If you prefer to use the number keypad when writing in portrait mode, you can switch from the on-screen keyboard to the on-screen keypad.
Select Settings and Phone > Language > Writing language, then select the language and Phone keypad.
Keys on the keypad