How to apply rate limit to a consumer on a service based on 200 status code?

I want my consumer to hit a service 10 times / day for all the 10 hits the response status code was 200. If it was something else, then I would not count it as a successful hit.

Is there any way in kong to do that? I checked response rate limiting but it seems to be different than my use case.