Update TorrentCount property only when necessary.

Also remove some old unused piece of code.