Of course, in the function I wanted to use "*" , not "count(*)" , this mistake is because of I tried everything... Thanks in advance again!
pgsql-novice by date:
Соглашаюсь с условиями обработки персональных данных