Rewrite of the SetItemCount: bugs got squashed,