How many nodes would one typically check to determine the longest chain? Before posting a solved block to the longest chain, how many nodes would one need to check before making sure that the longest chain was found?
Each node acts independently, the Bitcoin protocol is designed so that you do not have to trust any other nodes to verify the state of the network.  

If your node hears about a new block at the chain-tip, it will check to see if the block is valid according to the network's rules. Assuming the block is valid, it will be added to your local copy of the blockchain. 

If your node later hears about a longer (valid) chain that doesn't include the block you just added, then you would 'reorganize' the last couple blocks, in order to create what you now know to be the longest chain. The previously accepted block would be discarded, and become what is commonly referred to as an 'orphan block'.

By this mechanism and the related game theory, the network's nodes are able to maintain consensus around the blockchain's history. The more confirmations a block has (ie blocks mined on top of it), the more certain one can be that it will not be 'reorganized', meaning the payment is more permanently included in the blockchain.