Related objects are linked only when count > 0 (fixes #1055)