Some modifications to the pagination method

- Will probably end up completely reworking the counting and pagination methods to try to make them a bit more OS-agnostic.