PHP changes-- added "count_by_pk" to count for pagination using only the primary key for simplifying counting on complex queries -- also added output_processor which accepts an anon function for processing before output to browser