I was just playing around with this and found that if you want to use the query 'select count() from datapoints' you need to use the data source as a 'non row based query' and then set the column name to 'Count()'. You can see this in the test utility if you look at the Column name, its shown as COUNT(*) when you test the query.
You could also use this query if you want to have a specific column name:
select count(*) as pointcount from datapoints;
As for your last question you can put this all together like this:
SELECT (
SELECT COUNT(*)
FROM datapoints
) AS pointCount,
(
SELECT COUNT(*)
FROM datasources
) AS datasourceCount,
(
SELECT COUNT(*)
FROM events
) AS eventCount,
(
SELECT COUNT(*)
FROM eventHandlers
) AS eventHandlerCount,
(
SELECT COUNT(*)
FROM users
) AS userCount
FROM dual
The thing to notice here is the keyword 'dual' at the end, this is required as you cannot perform a select without a from clause and the dual table that all accounts can access for common needs and it has one record.
Just make sure you change the data source back to not use the row based query.
FYI To format as code just make sure your lines are all indented by a tab or 4 spaces and has whitespace lines above and below.