To implemente pagination on this rest api is not that simple, you need to do some tweaks.
Default URL - "/sites/dev/_api/web/lists/getbytitle('StudentsList')/items?&$top=5";
For this go through the response of first REST Ajax call. If you read each property carefully you will get answer for pagination. Properly "__next" is nothing but the REST url for next page :). Is it simple? Yes. So use "data.d.__next" to get next page items. REST service always returns this property whenever there is possible next set of items otherwise returns null.
Below is what url you will get
To get total count you need to make /itemCount rest call.
Adjust your logic to divide data in pagination and use _next attribute to get next set of data.