Add request count middleware