Hi,
The "messages per page" is how many recent messages the app looks at when it checks mail.
For IMAP, this means updating the flags, for POP3, just how many it looks at and downloads if needed (esp. since POP3 servers like to reorder messages).
The "messages to keep" is how many recent messages the app keeps on the device, automatically trimming as necessary (about once every 24 hours).
Message counts in the account list show the unread count and the server's message count. The unread count is taken from the server for IMAP, and is tracked locally for POP3.
The counts are adjusted for "hidden" and "moved to deleted" messages.
For IMAP, the app shows the most recent "page" worth of messages, i.e. those it knows to be up to date (since IMAP allows older messages to change flags, be starred, etc -- the app isn't going to try and keep them *all* in sync, e.g. all 100K or more for some...)
For POP3, the app shows, typically, the entire on-device message cache.