circular sorted array finding element and couting rotations