To calculate count entities buildSearchCriteria() is used and for this case ORDER BY should not be added to query (it doesn't make sense and doesn't work correctly with H2)
Closes PLAY-174