counter for non-empty cells