implemented item counter