basic message length counter