I don't know why you are having so many problems with this as I have used aggregates such as 'COUNT(...) AS count' in several places in my framework. If you take a look in the Dictionary subsystem at the 'List Database' task you will see columns on the right which show the table count and the relationship count. In order to get around the 'group by' problem I have replaced the 'COUNT(...) AS count' with inner selects such as:
$sql_select .= ', (SELECT COUNT(database_id) FROM dict_table
WHERE ct_table.database_id=dict_database.database_id) as table_count';
$sql_select .= ', (SELECT COUNT(database_id_snr) FROM dict_relationship
WHERE dict_relationship.database_id_snr=dict_database.database_id) as rel_count';
If you want an extra row displayed at the end of the list to show overall totals then you need to check out MySQL's WITH ROLLUP option. This is mentioned in FAQ127.