fixed total items counting