added query param support and fixed count()

Added support for existing query params to pagination helper

Changed Model.count({where:where},...) which doesn't work to Model.count(where,...) which does.