added request count and ctrl-c handling