SCHEMA:
CREATE TABLE country (Code VARCHAR, Name VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR)
USER:
How many official languages does Afghanistan have?

QUERY:
SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Afghanistan" AND IsOfficial = "T"