neighborly/neighborly — pull request #61 by ssjr (2014-02-22 20:47:21+00:00)
Title: Change #length to #count

Use SQL COUNT query in `User#total_led` and `User#total_contributions`

```sql
SELECT "contributions".* FROM "contributions" WHERE "contributions"."user_id" = $1 AND ("contributions"."state" IN ('confirmed')) AND "contributions"."anonymous" = 'f' [["user_id", 2]]
SELECT COUNT(*) FROM "contributions" WHERE "contributions"."user_id" = $1 AND ("contributions"."state" IN ('confirmed')) AND "contributions"."anonymous" = 'f' [["user_id", 2]]

SELECT "projects".* FROM "projects" WHERE "projects"."user_id" = $1 AND ("projects"."state" NOT IN ('draft','rejected','deleted','in_analysis')) AND (projects.state NOT IN ('soon')) [["user_id", 2]]
SELECT COUNT(*) FROM "projects" WHERE "projects"."user_id" = $1 AND ("projects"."state" NOT IN ('draft','rejected','deleted','in_analysis')) AND (projects.state NOT IN ('soon')) [["user_id", 2]]
```