backport from 1.9 (rev #9747)
fixed bug on fetching the memcached counter value
Reported by Julien Chavanton