pagination
better counts page
fix max page conditions