The problem with that solution is that each record is an associative array, and each record can have ( usually has ) more than one attribute. A count would always return an integer greater than one.