Set p's failcount to f, the port of peer_list::set_failcount. It adjusts the candidate count in whichever direction the change implies.
peer_list::set_failcount