Check POP/IMAP CLI

Are there any way to check how many emails are in POP/IMAP inbox in server with out using Mail.app?