public function getCount($folder = null){

        if ($folder) {
            $conn = $this->getFolder($folder);
        } else {
            $conn = $this->conn;
        }

        return imap_num_msg($conn);
    }
public function getCount($folder = null){

        if ($folder) {
            $conn = $this->getFolder($folder);
        } else {
            $conn = $this->conn;
        }

        return imap_num_msg($conn);
    }
public function getCount ( $ folder = null ) { if ( $ folder ) { $ conn = $ this -> getFolder ( $ folder ) ; } else { $ conn = $ this -> conn ; } return imap_num_msg ( $ conn ) ; }
Get Count of a folder

@param null $folder
@return int
Get Count of a folder