function CountLimiter(maxItemsPerFrame) {
        this.maxItemsPerFrame = maxItemsPerFrame;
        this.itemsLeft = 0;
    }
@param maxItemsPerFrame - The maximum number of items that can be prepared each frame.