The preferences on quota surplus votes are transferred at a fractional value, so every ballot is counted.
It didn't always used to be though - prior to computers, to establish the fractional vote transfers, a "sample" of surplus votes to a quote used to be randomly selected.