add counter cache from variants to stock items

fixes #5520