box count

add box count function