public static String[][] getCountedInventory(List<Item> list) {
        String[][] invenCount = new String[list.size()][2];

        for (int i = 0; i < list.size(); i++) {
            for (int j = 0; j - 1 < i; j++) {//i should use a map here instead lol
                //short circuits here
                if (invenCount[j][0] != null && invenCount[j][0].equals(list.get(i).getName())) {//if the names match
                    invenCount[j][1] = Integer.toString(Integer.valueOf(invenCount[j][1]) + 1);
                    break; //dont need to check rest of array if similar
                }
                else if (invenCount[j][0] == null) { //if it doesnt find the item then it adds it to the string
                    invenCount[j][0] = list.get(i).getName();
                    invenCount[j][1] = "1";
                    break; //dont need to check the rest of array if inserted
                }
            }
        }
        return invenCount;
    }