add ability to order randomly, and allow count to not be omitted optionally