Add __len__ to session.warnings