UseCounter: Don't try to return more results than max_results

This made the application crash.