This is fairly easy to understand. In each call, the value of the number variable is printed. We then check whether the base case has been fulfilled. If not, we make a recursive call to the function with the current value decremented.
One thing to notice is that an outer call cannot move forward until all the inner recursive calls have finished. This is why we get a sequence of 5 to 0 to 5.
xxxxxxxxxx
def rec_count(number):
print(number)
# Base case
if number == 0:
return 0
rec_count(number - 1) # A recursive call with a different argument
print(number)
rec_count(5)