Update rect.py

added __len__ method