Postgresql Count Distinct Elements In An Array Can Be Accessed