It may make more sense to someone reading this to use:

```ruby
while counter <= 3
```

Or better yet:
```ruby
guesses = 3
while counter <= guesses
```