update state count