I want to get the unread mail count of the mail i configured in my Mail App through my App.
If not can i set my own IMAP/POP3 setup configuration and access the mail server i configured and get the Unread mail count. If so point me in the direction where i can start coding for setting up mail server.
It wouldn't be very cool if random apps could get at your email login/password, now would it? There is no API for getting the unread count.
Your only option is to implement an IMAP/POP3 client in your app, and have the user enter their login / password again in your app.
If you're going that route, try searching GitHub for IMAP/POP3 clients.