Task: Text to Code
Input (English): SQL: SELECT Count ( DISTINCT Code ) FROM country WHERE Continent = "Afghanistan"
Feedback: Search number of corresponding rows of countrylanguage for which country's name equals Afghanistan .
Output (English): SELECT COUNT(*) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.Name  =  "Afghanistan" AND IsOfficial  =  "T"