fix duck count calculation