Heaps, .get_smaller_child() method

https://www.codecademy.com/paths/computer-science/tracks/complex-data-structures/modules/cspath-heaps/lessons/python-heaps/exercises/python-heaps-smallest-child
Here in this exercise, as you can see below, I was wanted to create .get_smaller_child() method.
image
I created as I was requested in the instructors however I couldn’t understand the logic behind this specific code:
image
What is the purpose of comparing the index of right_child with self.count ? What is the relation of self.count in finding whether there is a right_child or not ?