How to limit the number of available items