Mr. Thaksin received the votes of 377 lawmakers out of 500 in the parliament 's lower house during a televised vote Wednesday , making him the first democratically elected prime minister to hold a second term .