Fixed length counting, added new tests