How many friends does Dan have?
CREATE TABLE personfriend (
    name text,
    friend text,
    year number
)

CREATE TABLE person (
    name text,
    age number,
    city text,
    gender text,
    job text
)
SELECT COUNT(T2.friend) FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'
Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many friends does Dan have? ### Input: CREATE TABLE personfriend (
    name text,
    friend text,
    year number
)

CREATE TABLE person (
    name text,
    age number,
    city text,
    gender text,
    job text
) ### Response: SELECT COUNT(T2.friend) FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'