port PFADD/PFMERGE/PFCOUNT impelemtation from redis