Yeah, this is odd if you really want to filter out input to be integer / numeric only.
In that case, you'd need to use multiple filters:
$num = (int) $this->filter->sanitize($num, ['myCustomFilter', 'alphanum', 'int']);
Source of this custom filter:
//clean %20 URL encoded bytes
$filter->add('myCustomFilter', function ($dat = null){
return rawurldecode($dat);
});