MySQL expects one column from your subquery, i.e. SELECT in parentheses can only SELECT for one column.
In your example, you could use two subqueries, one that returns a counter, and another that returns a sum, but you can also rewrite your query as follows:
SELECT g.id, COUNT(t1.customernumber), SUM(sales)
FROM
customer_groups g LEFT JOIN transactions t1
ON t1.customernumber between g.from_customernumber and g.to_customernumber
source
share