output state and count of topic