Implement __len__() and __nonzero__().