Adding function for computing the known prefix and suffix counts for an item.