A lightweight counter