This is because COUNT (*) simply counts the result rows for each group.
If the query does not have a GROUP BY clause, then there is one implicit group of all results, so you just get the number of rows.
If you add GROUP BY to your query, as in the following example, you should get the desired result:
SELECT (COUNT(*) AS ?count) WHERE { ?a <http://xmlns.com/foaf/0.1/topic_interest> ?s} } GROUP BY ?s
source share