write line counter