Write a function that reads a JSON file and loads it into BigQuery.
Asked in the round 1 stage. For deterministic grading, the file contents are supplied as file_content; the function validates a JSON array of objects and returns the number of records that would be loaded.
file_path, project_id, dataset_id, and table_id are strings. file_content is a JSON string whose root must be an array of objects. Return the record count. Raise ValueError for an invalid root.
def load_json_to_bigquery(file_path, project_id, dataset_id, table_id, file_content):