a simpler impl for uniq abs value counter