Also count failed requests, when setting a max number of requests

Fixes #109