Comparator Rail

The Comparator Rail outputs the redstone level of the cart on it, if said cart is an inventory (specifically if it implements IInventory, has the IItemHandler capability or implements IItemHandler).