Php Count Different Values In Array Postgresql Logo