This is for singleplayer only (sandbox mode), don't cheat in multiplayer.
You can search for 1st inventory slot number of items (20 for example), switch with some other resource and look for that number (50 for example), continue until 1 result is left, that is the number of resources for that inventory slot. I don't recommend freezing value, since it can be empty if you move the item from said slot, but if you wont move it and make sure that that slot is never empty it should be ok. Use split item command (hold SHIFT) to take half of values of something. This way you get to cheat, but not too much, since you still need to find the resource first, then you may edit the quantity of it. This works with non-stackable items too.
So find item quantity of first inventory slot (doesn't need to be first), look for value, change that number, look for value, repeat until found the address (it is 4 bytes). Freeze value, use shift to take half while frozen, or not. I don't recommend freezing if you aren't careful, it may crash the game, just put crazy high number and chill. Will work from start, you can switch iron, carbon, sulfur and get all those items to over 9000!