New Zealand has declared a whooping cough epidemic, the fourth since it became a notifiable disease in 1996.