#4. Write a program to count how many reference variables in a program. 

import sys
class Demo:
    pass
d1=Demo()
d2=d1
d3=d2
d4=d3
print("The number of reference variables:",sys.getrefcount(d1))

cf23786f3b8283cafa6e94795cbf308012bd3774
<mask token>


class Demo:
    pass


<mask token>

<mask token>


class Demo:
    pass


<mask token>
print('The number of reference variables:', sys.getrefcount(d1))

<mask token>


class Demo:
    pass


d1 = Demo()
d2 = d1
d3 = d2
d4 = d3
print('The number of reference variables:', sys.getrefcount(d1))

import sys


class Demo:
    pass


d1 = Demo()
d2 = d1
d3 = d2
d4 = d3
print('The number of reference variables:', sys.getrefcount(d1))

#4. Write a program to count how many reference variables in a program. 

import sys
class Demo:
    pass
d1=Demo()
d2=d1
d3=d2
d4=d3
print("The number of reference variables:",sys.getrefcount(d1))
