distinct count in StockRepository