fix categories count and tokens count for redis backend