Counter library