add counteq & countne (from MLBase)