You should be able to do this by getting all of the tasks for a project and selecting the completed field using the ?opt_fields=completed option on your request.
E.g., http://app.asana.com/api/1.0/projects/[project]/tasks?opt_fields=completed
where [project] is the project ID you're querying. This will return the completed status of all tasks within a given project. You would then iterate over the returned tasks and count the completed/uncompleted statuses.
Note that with the opt_fields option, only the identified fields will be returned.