Am I missing something here?

The count_rotations_binary function is not working as expected for the input array of [5,6,7,2,3,4]. All other test cases are working as expected.
Link to Notebook: gurubrahmam443/python-binary-search-assignment - Jovian
3rd test case in the below pic.

Did you fix your function count_rotations_binary meanwhile as it seems to work fine now?

One thing you can take advantage of in Python is that you can access last element in list by typing nums[-1]. If you would need n’th element from behind then you do nums[-n].