Probably the easiest way is to simply run a SQL query like this, using the native MySQL functions.
SELECT COUNT(*) FROM qa_posts WHERE type='Q'
Alternatively, you can access Q2A outside of Q2A using the code here. You should be able to run a query using the function qa_db_query_raw.
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.