(Bsmiles32) Backport - replace Count macro