Calculatin' dem stacks.
Can handle any number of item signals. The values of those do have upper limits, but since nobody sane would try to load a train with more than 500k tanks...
This contraption will also round up for partial stacks. Meaning, if you have 101 rails, it will count them as 2 stacks, since that single rail does actually take up another slot.
Credits to AssemblyStorm for simplifying this setup from about 6 times the size to just this... Apparently algebra is OP.
If you wanted only the stack sizes, but not the actual stacks, use this BP: https://factorioprints.com/view/-LwH68dlvOEIKWkU5JqR
