Actually functional solution for basic counting