Cleaned up jersey server constructor, factored out searching and added a count method.