Need help with a count formula that needs to eliminate duplicated records

  • Hi, need some help here with the count and rows function. I've got a dataset that I need to sum up unique records. Managed to build that formula with a lot of trial and error, see column I. I now cannot seem to get my count/rows function to work. Keeps returning a '1' count for records that should be '0' or just blank. See result I get and the expected result in column K and L. I've copied the formula I've currently applied into cell H20. Can someone tell me what I am missing or doing wrong here?