Count and fill detection and output