Changed the count field to use a mutable int for performance reasons