count messages and bytes