Semiparametric estimation for count data through weighted distributions