O(n) because:
The count function will get executed like as follows:
for i=n ---> count will execute n times
for i=n/2----> count will get executed n/2 times
.
.
.
.for i=1--> count will get executed for 1 time
so, we will sum up all of this:
O(n+n/2+n/4+.......1)=O(n)