Also create generic qa_db_selectspec_count function for modifying a selectspec with COUNT(*).
Add selectspec for counting messages
And normalize some line endings