added new code for find kannel count and also for sending email