added UPC-count function