public static int getHeaderCount(TableDesc table) throws IOException {
    int headerCount;
    try {
      headerCount =
          getHeaderOrFooterCount(table, serdeConstants.HEADER_COUNT);
    } catch (NumberFormatException nfe) {
      throw new IOException(nfe);
    }
    return headerCount;
  }
Get header line count for a table.

@param table
         Table description for target table.
ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java