def _count_headers(csv_data: str) -> int:
    """Return the number of header rows in the CSV string data.

    Header rows are defined by having a number in their second column because
    the first column contains the sample (test) name which could be a number.

    Raises:
        ValueError: if cell is empty or cannot be converted to a float.
    """
    for line_num, line in enumerate(csv_data.splitlines()):
        try:
            # Try converting the second column to a float
            float(line.split(',')[1])
            return line_num

        except ValueError:
            # Empty cell, or cannot be converted to a float
            continue

    # Raise a ValueError if no end to the headers was found
    raise ValueError('Line starting with integer not found')