If `count` isn't specified, `c` will still be `None` here, and you'll return without doing anything. I guess the right solution is to initialize `c` to 1, change the above if test to `p < 0 or p + c > len(self.jukebox.ctr)`, and remove the similar if test below.