Add function to count column headers