This is where databases that support row values can be helpful. The original query:
SELECT count() FROM scale_data WHERE section = ? AND id2 = ?
would be re-written with row values as:
SELECT count() FROM scale_data WHERE (section,id2) = (?,?)
In such a case, the database will revert to a table scan if it can't find an index that matches all of the columns (in left-to-right order) in the row value on the left-hand side of the expression, which would be immediately apparent in the actual performance of the query and the query execution plan.