checks total number of the items