Farms add +1 Food to the tile they are on; each population requires 2 food. Thus, tile-score;
Enter the city screen right after a city is founded; count tiles in the fatcross with 1 food as -1, 0 food as -2, 2 food as 0, the city tile as 2, and 3 food as 1. Add up all the values. If it is a negative number, then the number of farms you need is enough to bring the value to 0. if it is positive, divide by 2, and that is the number of specialists you can have.