public static int getMenuSize(int count, int itemsPerLine) {
        Preconditions.checkArgument(itemsPerLine >= 1, "itemsPerLine < 1");
        return (count / itemsPerLine + ((count % itemsPerLine != 0) ? 1 : 0));
    }
Utility method to get the number of lines needed for x items

@param count the number of items
@param itemsPerLine the number of items per line
@return the number of lines needed
helper/src/main/java/me/lucko/helper/menu/Gui.java