fusion of partBySign and countAndCheck