Like the max-count option in git log:
-<number>
-n <number>
--max-count=<number>
Or the -n option in gnu head/tail
Also it would be nice if the library had appropriate visibility of utility methods so a user can implement such behaviour himself (I don't think that's the case currently, e.g internal object PosixNaming).