Since limiting queries to a certain range depends on the underlying database engine, we also have the queryRange() method on our database connection service, which we can use to write queries that include ranges:
$result = $database->queryRange("SELECT * FROM {players}", 0, 10);
In this example, we query for all the players and limit the result set to the first 10 records (from 0 to 10). So, with this method, the placeholder value array is the fourth parameter after $from and $count.
Alternatively, using the SELECT query builder, we have a method on the SelectInterface whereby we can specify a range. So, in that format, the previous query would look like this:
$result = $database->select('players', 'p')
->fields('p')
->range(0, 10)
->execute();
As you can see, we have the range() method, which takes those arguments and limits the query.
A note on running select queries on Entity tables: if you can do so using the Entity Query, use that. If not, feel free to use the database API. However, stick to using the query to figure out the IDs of the entities you need, but then use the entity storage handler to load those entities properly. This is unlike the many times in Drupal 7 where we simply used field values from such queries directly. In Drupal 8, that is highly discouraged.