Added setCount method