fixed not calling core.NumberElements when counting units