'''
3. Define a variable in a class
to track how many instances of the class are created (when an object is instantiated, this variable is +1,
when an object is destroyed, this variable is automatically -1)
'''
class Person:
count=0
def __init__(self):
Person.count+=1
def __del__(self):
Person.count-=1
p=Person()
print(Person.count)
del p
print(Person.count)