Counting is under way in the Farrer by-election, in a key vote that could shake up Australian politics and deal a blow to the major parties.