1) Broadly speaking, a Gmail goal runs a query on your account and returns the number of messages that match that query. The lowest value in a given day is that day's datapoint.
A query can be anything that you would use to find the messages in Gmail. For instance, if you want to track all unread emails, you'd say "is:unread." If you wanted to find all emails labeled "todo," you'd say "label:todo." For emails with a yellow star, you could say "has:yellow-star." You can also use Booleans to combine these - so "is:unread AND label:todo" would find only the unread emails labeled "todo." You can try out different options using the search bar in Gmail itself to see how many messages a given query returns.
To set up a query other than the default, which counts messages in your inbox marked as "read", you would go to the goal page, choose Settings > Gmail Query, and enter the new query you'd like to use. The last time I tried to do this, I encountered some problems, but a quick email to firstname.lastname@example.org straightened things out for me. If all else fails, let them know exactly what you're trying to do and they can help you get set up correctly.
2) and 3) Beeminder lets you set up the rate and handles it automatically. Once you've decide on your query, determine the rate of change. For instance, if you want to decrease the total by 10 every day, you'd go to the "commitment" tab, and in the "Commit to" section, you'd enter "10 per day." Once you click update, the graph will adjust. Again, if you encounter problems getting things set up how you'd like, support will be happy to help.
If you get your inbox cleared out but want to keep tracking, you can set it flat at "0 per day" - that will keep checking that you're on track, but not require you to change anything beyond that point.