an attempt at counting