K-9 Mail is using the TOP command. The number of lines is calculated as seen in this snippet:
Unfortunately, the documentation is outdated. The functionality has been removed. I don’t consider the local database size to be valuable information for most people. If you need this level of detail, you’ll probably be happier using another email app.
(1) Thank you very much (TOP). I presumed it, it is a useful feature.
(2) I considered the mailbox size a maintenance measure, it reminded me to delete mails with large attachments (The same goes on the PC, when I store the attachments elsewhere and have to take care of the corresponding large mails).
On Android I looked at it when emptying the trash and seeing it slightly grow anyway.
I can alternatively get the amount used by the apps in the Android systems settings. I do manage this, but specially on apps using Internal Storage.
(3) Is there a way to “compact” the mail data base? Maybe it is no longer needed.