When having multiple upper (or multiple lower) bounds in the query, the efficient range count mechanism is failing. As an example, consider the query
There are two upper bounds for ?o, namely the constant "5"^xsd:integer and the variable ?X. ?X is dynamically bound, so at evaluation time the optimizer doesn't know that ?X will be bound to 5 (which is ok). However, in that case the optimizer should use "10"^xsd:integer as an upper bound, which is not the case (in fact, only a lower bound is used for the query).
The reason is that the ASTRangeOptimizer "composed" multiple range restrictions using MIN nodes. These MIN nodes, however, cannot be interpreted later on s.t. range restrictions are ignored.