The Reds turned down a €100m (£91m) offer from Barcelona for Coutinho last week, with owner Fenway Sports Group later releasing a statement ruling out the sale of the Brazilian midfielder for any price.
However, Coutinho submitted a transfer request asking to be allowed to join Barcelona hours after the statement was released, putting his future at Anfield in doubt.
Townsend advised Liverpool to cash in on Coutinho and use the money from the sale to sign Southampton centre-back Virgil van Dijk and a new striker.
"I would sell Coutinho," he told Sky Sports. "Not because I do not think he is a good player – I think he is a brilliant player – but I think they need one at the back and also a No 9.
"If they go and buy a No 9 and were to go and get Virgil van Dijk as well, I think that is a good trade for Coutinho."
Townsend noted that Liverpool's difficulty over Coutinho stems from the fact that they only have two weeks to sign a replacement for the Brazil international if they decide to offload him.
"The reason the deal probably has not happened is that Liverpool are desperately trying to secure players and spend that money," he explained.
"[Liverpool manager] Klopp will probably have to concede to the owners, 'If you are going to get rid of him, please let me have this one, let me have that one. Can we go and do that?'
"But everybody, of course, knows that Liverpool are maybe £100m richer all of a sudden, so every player they are nibbling at, the prices are higher and going through the roof.
"It is a very difficult set of circumstances, not just as straightforward as being able to say, 'Thanks very much, we will sell him and go and have those.' You cannot do it that easy."