Can you for example check with IC2 or buildcraft if in a chest there are at least 32 diamons. If 32 or more in that chest send a redstone signal.