What if all the 8 peers of the node are malicious?
But what if all the eight nodes to whom a given node send the transaction are malicious/faulty? And all of them change the message in the original transaction. Wouldn't it allow for wrong transaction to get merged in the blockchain network?


Transactions have signatures that sign the whole transaction (except signatures. Signatures are added after the transaction is signed). Signatures prove authenticity so it's impossible to change the transaction without invalidating the signature check.


  I just want to know that when a node sends the transaction it received to its peers, the peers send it to their peers, how does the network keep the count of which transaction has been accepted by how many nodes? 


There's no count of acceptance. Every node keeps its own mempool which is a list of transactions that could be included in the next block.

PoW is about making blocks. When a block is broadcast, the transaction becomes the part of the immutable blockchain (unless that block is orphaned (replaced by another block.))

If the only nodes you're connected to are malicious, the worst thing they can do to you is to isolate you and log your IP-address and transactions.