Moved setTotalCount to private method. The only one that should call that is the constructor.