Counties in Pennsylvania are directed to not count illegal ballots, the state’s top court said in a ruling issued Monday.