Guess user number between 0 and 100 (Binary Search)
Your calculation of count is incorrect in two ways:
 1. You don't count your last guess;
 2. You count invalid user input.

I would separate the input validation from the input processing. And I would add some logic to handle user input that leads to trying the same guess repetitively, for this the user has to lie, but who guarantees us they won't?