Make interface to PopCount more generic