How to find the count of words (all and unique) in a column row-wise?
To solve your issue I did the following:

CREATE TABLE wordcount (id SERIAL NOT NULL PRIMARY KEY, description TEXT NOT NULL);


Populate it:

INSERT INTO wordcount (description) VALUES ('What a great day');
INSERT INTO wordcount (description) VALUES ('This is a product. It is useful');


Then performed the following query (fiddle available here):

WITH arranged AS
(
  SELECT id, UNNEST(STRING_TO_ARRAY(
                   REGEXP_REPLACE(description,  '[^\w\s]', '', 'g'), ' ')) 
                   AS word, description 
  FROM wordcount
)  
SELECT a.id, COUNT(a.word), COUNT(DISTINCT(a.word)), a.description
FROM arranged a
GROUP BY a.id, a.description;


Result:

id  Word_Count  Unique_Word_Count   Description
 1           4                  4   What a great day
 2           7                  6   This is a product. It is useful


If you're new to all this, I would advise you to go through the fiddle here which shows the development of my thought processes which led to the query above. 

I would advise you to put this logic into an onInsert/onUpdate trigger - it's probably fairly computationally intensive. This means the computation is only performed once. Version 12 will allow generated columns (one of the few areas where MySQL is superior to PostgreSQL) which could be a good solution.