Collect statistics
Count states