How to limit the result count for a role with x-pack

hello,
for example, I want to set a role only has read 10 doc privileges,but I found that there is no way to set size by updating role

what should i do?
thanks

Never heard about such a use case which is not about the content of documents but the numbers of documents whatever content.