fixed a bug in count_interface