Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE documents ( document_id number, document_type_code text, grant_id number, sent_date time, response_received_date time, other_details text )
TABLE: CREATE TABLE tasks ( task_id number, project_id number, task_details text, eg agree objectives text )
TABLE: CREATE TABLE organisation_types ( organisation_type text, organisation_type_description text )
TABLE: CREATE TABLE organisations ( organisation_id number, organisation_type text, organisation_details text )
TABLE: CREATE TABLE projects ( project_id number, organisation_id number, project_details text )
TABLE: CREATE TABLE research_outcomes ( outcome_code text, outcome_description text )
TABLE: CREATE TABLE grants ( grant_id number, organisation_id number, grant_amount number, grant_start_date time, grant_end_date time, other_details text )
TABLE: CREATE TABLE project_outcomes ( project_id number, outcome_code text, outcome_details text )
TABLE: CREATE TABLE project_staff ( staff_id number, project_id number, role_code text, date_from time, date_to time, other_details text )
TABLE: CREATE TABLE research_staff ( staff_id number, employer_organisation_id number, staff_details text )
TABLE: CREATE TABLE document_types ( document_type_code text, document_description text )
TABLE: CREATE TABLE staff_roles ( role_code text, role_description text )

### Question ###
How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?

### Accurate SQL ###

SELECT COUNT(*) FROM project_staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'