you can achieve this easily without writing Js. Just add an attribute called data-page-length={put your number here}. see example below, I used 100 for example
<table id="datatable-keytable" data-page-length='100' class="p-table table table-bordered" width="100%">