Counting using window function with partition over an empty table
Your query outputs one row for each row in the table, so an empty table must result in an empty output.
(COALESCE handles NULL values, but what you have is not a NULL value, but no value at all.)

You could add another query:

select count(*) over (partition by field_name) 
from my_empty_table

union all

select 0
from my_empty_table
where not exists (select * from my_empty_table);